I'm using Drupal 4.7.2, and views.module,v 1.141
Following the readme.txt file I installed the module Views Alpha Pager.
What I did:
-- make a patch to the views.module with the patch http://drupal.org/files/issues/views.module_1.diff ;
-- Copy views_alpha_pager.module to my module directory and then enable on the admin modules page;
Now I try to edit my view, but I can't find Pager option "Alpha" on any edit page of views. Anyone can help? Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | views_alpha_pager.patch | 1019 bytes | douggreen |
| #5 | alphapager.png | 11.07 KB | douggreen |
Comments
Comment #1
douggreen commentedSorry, the README text was slightly out-of-date. If you downloaded the latest modules, you do not need to make the patch. Please download the latest views 4.7.x-1.x module and the latest views_alpha_pager 4.7.x-1.x-dev module. I'd also suggest that you upgrade from Drupal 4.7.2 to 4.7.2, but this should have no affect on your problem.
Did you enable the pager module on the admin/modules page?
Comment #2
astra commentedOf course, I enabled the pager module on the admin/modules page.
Now I try upgrading to the lateste Views 4.7.x-1.4, but I get an error on my web page, see http://drupal.org/node/104400
So I recover to old views.module,v 1.141. any solution to support your views_alpha_pager 4.7.x-1.x-dev ?
Comment #3
astra commentedAfter upgrade to Views 4.7.x-1.3 it seems no problem for my site. But I still can't find Pager option "Alpha" on an edit page of the new Views module. It doesn't work for the latest views_alpha_pager 4.7.x-1.x-dev module.
Comment #4
astra commentedThe latest views_alpha_pager 4.7.x-1.x-dev module still doesn't work after my site upgrades to the latest Views 4.7.x-1.4-2.
Comment #5
douggreen commentedI'd like to help you get this working, but "it still doesn't work" doesn't give me much to go on. Your initial comments say that the "Alpha Pager" option is not showing up, however, I'm not sure if that is the problem you are still having. If this is the problem:
1. I have a fresh install of the 4.7.x-1.4-2 version of views
2. I have the latest views_alpha_pager 4.7.x-1.x-dev module.
3. I have enabled the views, views UI, and views alpha pager modules
4. I "add" a new view from admin/views page
5. I clicked on the "page" collapsible fieldset to add a page, and I see the attached picture which shows the "alpha pager" option.
6. Finish creating the view, creating a page, selecting the "alpha pager" and selecting a alphabetic "sort" order. I typically give the view a URL.
7. visit the view page. Do you see the numeric pager (1 2 3)? Do you see an alpha pager (the letters won't necessarily be A B C, depending on your data, it might be B F M N, etc.)
If the pager itself isn't working,
1. Have you selected a sort based on an alpha field. The alpha pager groups all numbers together on one page and all punctuation characters together on another page. Thus if your sort is by number, everything will fall on one page. And when everything falls on one page, the alpha pager doesn't display any pages (because you are on the one and only page).
2. I just fixed two bugs -- one related to a SQL error if you sorted by node-id (which you shouldn't do anyways), and one where the alpha letter's were repeating incorrectly.
If this doesn't help, please be more specific than "it doesn't work".
Comment #6
astra commentedNow go to an edit page of views I can see the Pager dropdown list with three items "None", "numeric" and "alpha".
The problem is I can't make it work.
For an exist table type view of my site, which can display title column and a few other culomns, I open its edit page, go to Paper option list, I selecte "alpha" and save this view. when visit this view I still see its Pager number 1 2 3 ... and get a warning on the top of the view page:
Then I try changing something. I go back to the edit page of this view, browse to "Sort criteria" collapsible fieldset to add tehnode title as sort criteria, save it. Then visit this view again but I still get the numeric view with another warning:
If change the table type view to teaser list view as one your png picture displays, I get the same problem.
Thanks for your explain in detail but it's not clear for me how or where selecting a alphabetic "sort" order that you said. Because on the edit page of views one can add something to "Sort criteria" collapsible fieldset, and can set sortable properties for any fields that you want to display if using table type view, for example.
Comment #7
douggreen commentedare you using mysql or pgsql? I have only tested with mysql and probably have problems with the other database engine.
Comment #8
douggreen commentedI just realized that this last error you received:
means that there is something wrong with the view itself. I suggest that you first create a view using the numeric pager, add a sort based on the title, and once you have this working, then add the "alpha" pager.
Comment #9
astra commentedMy site is running with MySQL. After installed views_alpha_pager module all of my view pages (about 20 views) work well with the default numeric pager. If I change any view as alpha pager I always get these error message:
or
Comment #10
douggreen commentedThe first error message ("Alpha Pager enabled without a sort column, ...") is a valid error.
However, the second error ("Alpha Pager called with no defined query") is something I added to prevent php errors and trap an unexpected return from views. I'm not sure when this happens, but obviously it does, since you are hitting it.
Can you test the attached patch that is intended to fix the problem rather than display a message.
If it works, I'll add the code to the CVS release.
Thanks !
Comment #11
astra commentedPatched your http://drupal.org/files/issues/views_alpha_pager.patch and tested 3 view pages of my site. I got the same error message:
Comment #12
douggreen commentedThe 'Alpha Pager enabled without a sort column' warning is usually a valid warning. Are you sure that your view has a sort defined. If so, please export the view and paste it here (as code). You export a view using the "export" link (under "Actions") next to the view on the admin/views page.
Comment #13
astra commentedHere is exported code of a view page with 3 sortable fields:
Comment #14
douggreen commentedYou don't have any sortable fields:
You set this value under the expandable fieldset called "Sort Criteria". A common mistake is to add a field using "Add Criteria", but forget to save the view using "Save".
For reference, here is my export:
Comment #15
astra commentedAs what I tried, if I go to the edit page of this view, browse to "Sort criteria" collapsible fieldset to add the node title as sort criteria, save it. Then visit this view but I got the numeric view with another warning:
Here is exported code of a view page after added a sort criteria, anything else wrong? Thanks!
Comment #16
douggreen commentedI checked in an update last night around 1pm EST that you should try. It appears that the project packager hasn't created release for it yet, but you can get it from cvs. This message is not in the code anymore:
Sorry for all of the problems. Either (a) views changed the behavior of a hook I used and added a new hook, or (b) when the hook was initially implemented, I didn't take the time to realize that what was implemented was slightly different than what I requested. Either way, my bad.
Thanks!
Comment #17
douggreen commentedHaving not heard on this in over a week, I'm going to assume that my last comment resolved this. If you are still having problems, please create a new issue. Thanks!
Comment #18
astra commentedNot yet fixed. I tried the latest version views_alpha_pager.module,v 1.4.2.9 2007/01/04 instead of my current version views_alpha_pager.module,v 1.4.2.5. I got a strange problem. After set a view page as Alpha option, add the node title as sort criteria and save it, I click the url link of this view page (example.com/en/this_view) but the browser automatically switch to another view page with a strange url address example.com/?500.
any help? Thanks!
Comment #19
gtcaz commentedI'm also having this issue. My view was upgraded from 4.7. I do have alpha sort enabled (sort by title) and my view is indeed sorted. Yet I get the error "Alpha Pager called with no defined query".
Comment #20
douggreen commentedfixes are currently only occuring in D5... If you can reproduct this in D5, please reopen the issue and change the version to 5.x-1.x-dev. Thanks!