This problem confronted me in 6.x-2.5, so I just updated to 6.x-2.6. Problem persists. Here it is:
I've overridden the views_views_mini_pager() function using mytheme_views_mini_pager() as such things usually go, and the middle section (saying "1 of 19") appears at the bottom of my block. But the prev and next links fail to appear on any page, even when I leave the function completely unchanged (except for the "mytheme" name). This problem occurs both with and without AJAX.
So in order to see (and theme) the pager links, I had to hack the theme.inc file. And I don't want to do that!
Comments
Comment #1
As If CreditAttribution: As If commentedCORRECTION TO ABOVE POST: "views_views_mini_pager()" should say "theme_views_mini_pager()".
Comment #2
kostask CreditAttribution: kostask commentedI have the exact same issue. I was trying to replace the ‹‹ and ›› with images and tried to override the theme_views_mini_pager by copying it to template.php and renaming to {my_theme_name}_views_mini_pager.
Doing just this makes the arrows (‹‹ and ››) disappear and any changes to {my_theme_name}_views_mini_pager at template.php regarding the $li_previous and $li_next do not render at all.
All other modifications I tried work as expected.
The only way I found to put arrows instead of ‹‹ and ›› was to hack the core theme.inc file which is not something I wish to be doing.
Comment #3
kostask CreditAttribution: kostask commentedAs this issue is still not resolved, could someone point us at the right direction as to start debugging views to find out where this problem is caused?
I would be glad to help as I really do not want to hack drupal core on a live project.
Comment #4
dawehnerCould someone of you paste, what you are doing in your template.php?
I changed the text from the previous/next buttons.
@kostask
Can you explain your tagging?
Comment #5
kostask CreditAttribution: kostask commentedI will post the code tomorrow when I 'll be close to my files :)
Dereine, what do you mean by explain my tagging? I am a bit new to the issue system and thought to add tags relevant to the question.
So mini pager as there is where the problem is focused theme and theme override as this how we are trying to modify the site and views being the module at hand. If it is an inappropriate way to do or if I am missing something, please correct me.
Comment #6
kostask CreditAttribution: kostask commentedDereine, I have used your exact same code and I still face the same results. All my modules are up to date but the problem persists. The list of modules I use is:
Content Templates (Contemplate), CCK, Content Profile, Email Field, FileField, ImageAPI, ImageCache, ImageField, Lightbox2, Link, Login Destination, Poormanscron, Rules, Schema, Taxonomy Access Control Lite, Token, Views.
I am also using a subtheme of Zen. Since you do not seem to have the same problem, how do I proceed determining the error? Any help is greatly appreciated.
Comment #7
rakugaki CreditAttribution: rakugaki commented@dereine that works fine (great actually thx!) for me in my zen 1.0 subtheme.
sorry site is pre production so can't link.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedViews calls theme('views_mini_pager').
Once your code takes control, it's no longer Views' code.
We have successfully verified that this works.
We cannot go into your site and debug your site for you.
Comment #9
dwb17 CreditAttribution: dwb17 commentedI have the same problem, when trying to override the function in my template.php file.
I am using zen-6.x-1.1, which seems to be the trouble, since when i changed my site's theme to garland and applied the override it worked.
Does anyone have any idea?
Comment #10
rakugaki CreditAttribution: rakugaki commentedI did little more then copy paste the above code in to my zen sub theme's template.php. My sub themes are very heavily modified so that may have removed the problem and also my mini ajax pager is working on a pretty simple view that display's one item per page which maybe is avoiding problems that may occur with more complicated views.
Guess if i were you i'd disable everything and work of a dummy simple view and sub theme, then gradually re-enable modules and views and try and troubleshoot the problem by isolation. Sorry not very helpful :(
Comment #11
luco CreditAttribution: luco commented@merlinofchaos I don't know what other tried, but I did exactly that. copied the function theme_views_mini_pager, pasted it in template.php and renamed it to mytheme_views_mini_pager. renamed the links too, of course. it simply didn't work.
and I can't upgrade Zen because I've already got a whole theme based on starterkit (from 6.x-1.1) and who knows what this update would break.
Comment #12
Jon Nunan CreditAttribution: Jon Nunan commentedI had this, make sure your template.php file is encoded as UTF-8.
The default template.php in Zen 1.1 was showing up as ANSI encoding in my text editor. This meant when check_plain() was run by l() the '‹‹' encoded in ANSI caused it to return a blank string. Cross posting here because even though this is a Zen problem with l() they symptoms had me checking here first.
Comment #13
Rickdrummer CreditAttribution: Rickdrummer commentedThank you very much! After changing encoding to UTF-8, everything works fine!
Comment #14
dwb17 CreditAttribution: dwb17 commentedSecond meatsack solution UTF-8 encoding of template.php, now it is working fine.
Comment #16
camsoft2000 CreditAttribution: camsoft2000 commentedI can also confirm making sure the template.php file is set to UTF-8 encoding fixes this issue.
Comment #17
OxH2 CreditAttribution: OxH2 commentedjust had the same problem and adjusting the document encoding to UTF-8 fixed it right up