Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9269305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:05:09+00:00 2026-06-18T15:05:09+00:00

I use Sphinx to generate a list of needed ID ‘s. On this list

  • 0

I use Sphinx to generate a list of needed ID‘s. On this list of ID‘s I apply filters using the Sphinx language and then I create and return a new CActiveDataProvider using the Search Model method;

image example

$dataProvider = new CActiveDataProvider('model', array(
                    'criteria' => $criteria,
                    'pagination' => array(
                        'pageSize' => $this->pageSize,
                        'currentPage' => $this->cp_page - 1,
                    ),
                ));

In the view, now, I have:

<div class="search_result searchconright">
         <?php

                 $custom_pager_left = '
                <div class="pagetxt">

                <ul class="searchPager">
                    <li><span>View</span></li>
                    <li class="page"><a href="" class="page_search_limit">All</a></li>
                    <li class="page"><a href="" class="page_search_limit page_search_limit_active">3</a></li>
                    <li class="page"><a href="" class="page_search_limit page_search_limit_active">5</a></li>
                    <li class="page"><a href="" class="page_search_limit page_search_limit_active">24</a></li>
                    <li class="page"><a href="" class="page_search_limit">48</a></li>
                </ul>

                </div>
            ';

        $this->widget('zii.widgets.CListView', array(
            'ajaxUrl' => Yii::app()->createAbsoluteUrl('/employer/search'),
            'id'=>'listViewSearch',
            'dataProvider' => $model->search(),
            'template' => "{summary}\n{sorter}\n{items}\n<div style='float:left;width=700px;'>$custom_pager_left<div class='pagetxt'>{pager}</div></div>",
            'itemView' => '_index_post',
            'enablePagination' => true,
            'pager' => array(
                'cssFile' => Yii::app()->baseUrl . '/css/clistview.css',
                'header' => false,
                'firstPageLabel' => 'First',
                'prevPageLabel' => 'Previous',
                'nextPageLabel' => 'Next',
                'lastPageLabel' => 'Last',
            ),
            'summaryText' => '',
            'sortableAttributes' => array(
            ),
        ));
        ?>
    </div>

But this fails to work correctly, because if i click next, and the list end’s, somehow, the ajax code does not reinitialize the url that is being send, it keeps on to concat with the old url until the url gets so big that the app crashes.

Shouldn’t CListView verify if the data received exists? Sphinx could give a ID of a registration, that is no more there or inactive;

What’s happening and how can i prevent this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T15:05:10+00:00Added an answer on June 18, 2026 at 3:05 pm

    I found forum topic with some issues with ajaxUrl property and pagination. It looks like ajaxUrl is ignored by pagination. Weird, maybe thats the problem.

    Here is this topic: http://www.yiiframework.com/forum/index.php/topic/21886-problem-with-clistview-and-ajaxurl-property/

    Notice that at last posts route is set on dataprovider rather than listview. Internally listview, or grid view, should pass ajaxUrl into dataprovider.

    Here is how to manually setup route for pagination:
    http://www.yiiframework.com/doc/api/1.1/CPagination#route-detail

    $dataprovider->pagination->route = 'site/index';
    

    Also manually set params for pagination if some are used (including does coming with $_GET):
    http://www.yiiframework.com/doc/api/1.1/CPagination#params-detail

    $dataprovider->pagination->params = array('search' => 'Search string');
    

    Im also not sure how $custom_pager_left link hrefs should be set?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use thinking sphinx in my project on refinery cms. And I received this
Is there a way to display a Classes list / tab using Sphinx, or
I currently use Sphinx to generate LaTeX output which is turned into a PDF
I need to create a simple search but I can't afford to use Sphinx.
I am searching stemming algorithm for Slovenian language that I can use with Sphinx
I'm using Sphinx (v. 0.99) in my Java application. I also use it with
Similar to this chap's post , I'm seeing Sphinx generate unreadable graphviz output: How
I'm trying to use Sphinx to create some HTML divs for each of my
I am using Sphinx to generate HTML documentation for a Python program. I would
Is it possible to use Sphinx autodoc to generate documentation for my fabfile, from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.