Closed (outdated)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Mar 2011 at 05:42 UTC
Updated:
14 Mar 2019 at 19:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
liquidcms commentedComment #2
dawehnerWell it's an alpha :)
If you expect less bugs please try out the dev version. There are around 150 less bugs in the dev version, just a short assumption
Comment #3
liquidcms commentedsounds good. thanks.
Comment #4
liquidcms commentedretested update a couple times with latest dev version and still no luck... so sounds like a bug.
bumped version here to -dev
Comment #5
liquidcms commentedas a small side note.. it also looses override settings for pager for all displays
i.e. some of my displays have different pager settings - after update, all are set to use default which is set to enable paging, and unlimited number of items to show
Comment #6
dawehnercan you show an example view?
Did you saved the view in the meantime?
In theory the loaded views should automatically be moved to the new settings.
In general you should move from 6.12 to 6.x-3.x-dev. So please try to redo the steps in your development enviroment.
Comment #7
liquidcms commentedhmm.. ok.. yes i have the view and no i wasn't using 6.12 i was using a 2.x-dev from Feb so i could get clone display feature.
later today i'll try going to 6.12 and then 3.x-dev
Comment #8
liquidcms commentedone of the views in question is attached
Comment #9
dawehner|Yeah it's reproduceable with this view
The patch fixes the "unlimited" part.
Comment #10
liquidcms commentedcool.. will try it out. thanks.
Comment #11
dawehnerWhat was the result of your try-out?
Comment #12
dawehnerAdd a random tag
Comment #13
liquidcms commentedhey. sorry never got a chance to try out your patch... tough one to test.. lol.. i will need a snapshot of a Views 6.12 site that i cold then go and upgrade.. as i manually just went through on the project above and reset the defaults.
willing to assume your patch works :) (mostly since most of my work is in D7 now).
Comment #14
dawehnerHere is a new patch. Some testing would be really helpful.
Comment #15
dawehnerThis time with improvement to readability and some more code comments.
Comment #16
dawehnerCommited. Thanks chx for reviewing the patch and make suggestions.
Comment #17
MasterChief commentedI just downloaded the new version 6.x-3.x-dev, and it breaks all pagers, i can just save display all items in views use pager option even when i choose Display a specified number of items; so pager is broken.
Comment #18
dawehnerThis might fix it. Some testing would be cool.
Comment #19
David D commented#18 patch fixes it for me. Thanks!
Comment #20
MasterChief commentedI tested it and i confirm it works fine!
Comment #21
myxelf commentedAt least on D7.x sites, this is breaking things badly. Views depending on pagers to show large amounts of information (teaser listing of +400 nodes, will probably run out of memory).
The D7 solution is incomplete. After upgrading to latest D7.x-dev #17 started to happen. Confirming #18 fixes the new issue.
HTH
MyXelf
Comment #22
hswong3i commentedConfirm that #18 works for me, too ;-)
Comment #23
willvincent commentedHere's a p0 version of dereine's patch from #18. This will apply cleanly with drush make (against the current views 7.x-3.x dev as well, which is also affected by this issue.)
Worth noting: While this does allow pagers to work again, it seems there's still an issue with panel_content view displays. My interim solution for that is to allow setting the use page, items per page, and offset options in the pane config. Then setting these in the panel pane configuration when adding the view to a panel.
Thus far it seems to work pretty solidly.
Comment #24
myxelf commentedChanging status in the meanwhile
Comment #25
mwbyrd commentedOk. How do I install the patch?
Thanks,
Mike
Comment #26
dawehnerBetter then breaking this for many users, let's revert to the previous state of the logic and find a proper way to fix the behaviour which chx had.
Comment #27
fonant commentedPhew, I though I was going mad when editing a view reverted the page to "show all items" every time! #23 fixed it for me :)
Comment #28
dawehnerAfter many tries with chx here is a solution for non-database views.
Comment #29
dawehnerAfter many tries with chx here is a solution for non-database views.
Comment #30
dawehnerOkay after quite some improvements to the comments i commited it to 7.x-3.x and 6.x-3.x
Comment #32
nicholas.alipaz commentedThis still seems to be an issue. Using today's version of dev I get the following issue with all views that were previously working in alpha:
Comment #33
Encarte commentedI've updated a test site from Views 6.x-2.x-dev to 6.x-3.0 and I can confirm this problems:
a) All the block displays with «Use pager: No» were changed to «Paged, 10 items». Other block displays weren't affected.
b) All the «Panel pane» displays with «Use pager: No» were changed to «Paged, 10 items». Unfortunately, all the panel panes in this site that weren't with «Use pager: No» were with 10 items and pager, so, I would have to set a new test site to see what would happen to other settings. But, we can assume they would probably be ok, like in a).
c) All the «Panel pane» displays are showing all the nodes, despite being setted to «Paged, 10 items». Some have the «Allow settings: None» option on the «Pane settings», and some have «Allow settings: Some» (with pager settings on the panel that are being ignored). This is causing memory time outs in some views (e. g.: Fatal error: Maximum execution time of 60 seconds exceeded in /home/example/public_html/example/includes/theme.inc on line 668 )
None of this problems seems to happen on page displays.
Comment #34
nicholas.alipaz commentedMarking critical as this would break some pages on people's sites (when max execution occurs) and it breaks the normal operation of the module.
Comment #35
dawehnerThis is really a hard issue as you can't know whether a view got converted or not.
Comment #36
jparets commentedI had exactly the same problem with all my views and displays, both in 6.x-3.0 and 7.x-3.1.
This implies a big amount of rework in upgrading (I have more than 100 views)
I think the decision about conversion could be:
- When Use pager option in Views2 is set to No, the option in Views3 should be "Display all items"
- When Use pager option in Views2 is set to Yes, the option in Views3 should be customized.
Good work!
Comment #37
dawehnerThe best way to get a good update is to export your views to code with a decent version of views2.
Believe it or not but this is a way better way to see from which version things come from.
The current logic can be found at views_plugin_display::init(94). We have already tryed hard to get a version which works for all cases(which it does obvious not).
Comment #38
drzraf commentedMy 6.x-2.16 block pager settings aren't considered by Views 3.x.
dawehner the problem does not appear to be in the conditional itself, (because
!empty($items_per_page) && $items_per_page != 10matches my case) then happens :where
$pager=Unless the above structure is wrong, the issue probably happens later in the process.
Comment #39
drzraf commentedHere is the array as posted when using
options_submit,case 'pager_options':so either the array in the previous comment is too incomplete, either the
type(full or some affects the items_per_page setting)Comment #40
drzraf commentedI tried to reproduce such a
$pagerarray structure ininit()but it didn't changed anything.As my block settings are still greyed (marked
non-overriden) it's somewhere around pager override settings that the fight should happen) :|Comment #41
drzraf commentedHappens that adding
$this->override_option('pager', TRUE);at the end of the block is a good start: field not greyed anymore.I also found then that the default values (
options_formcase 'pager':) are still not those expected because at that time$pager = $this->get_option('pager');only returnsTRUEinstead of the array, but I don't know why.Comment #42
drzraf commentedI guess a call to
views_get_plugin('pager', $pager["type"])is missing somewhere ininit()but don't know how and where ; Drupal code is far from being a pleasant abyss to dig into, ... maintainer ?Comment #43
drzraf commentedI spent hours on this, again, without success.
Do you know guys that GPL forbids obfuscated code ! You overcame by far the limit between complexity and obfuscation. No one would ever takeover maintainer-ship without being paid for (and even so ...) !
There are probably nice contributors out there, but there's also many more hostages (/me being one of them)
Comment #44
merlinofchaos commentedObfuscated? Um. Okay.
I'm sorry you're having trouble understanding it, but that's completely unnecessary. I recommend you take a step back and perhaps invest your energy into something else. Fix your views manually and move on.
This is a really hard problem to solve as evidence by the history of the issue. There is no need to be so rude about it.
This issue is the exact reason we have been afraid to make the 3.0 line recommended.
Comment #45
drzraf commentedright, no offense but unnecessary provocation. [ I'd benefit from a `have a drink` widget in the dashboard ]
I'll move on, as you advise, but FYI a common bug stack (actually not that huge) is the following :
* afaict no official language fallback mechanism in Drupal 6 which is (often) a must-have
thus:
* i18n patch : #634144: i18n views content negotiation + Mixed current language, depends on
* i18nviews, depends on
* views 3, depends on
* solving this bug
excuse my naivety (or presumption) about this issue, I didn't find another bug it would have to depend on and believed it was "self-contained".
good luck with it
Comment #46
merlinofchaos commentedWell, unless you have a LOT of views, fixing your pager settings is merely tedious but completely doable. Once your pager settings are fixed manually for all your views, you should have no issues.
Oh, one other way of solving this: I believe this only happens for views that are in the database. So you can work around htis by:
Use the bulk export module to export ALL your views to code.
Use drush to revert all your views to the code version.
Upgrade to Views 3.
Once in views 3, either re-export all your views or save your views and remove the export module. Your choice. I believe *that* preserves pager settings properly. (dawehner, can you please confirm or deny this for me?)
Comment #47
dawehnerExactly the converting of the views works without problems if you have your views defined in code not in the database.
Comment #48
duaelfrYou two are right but #1557680: More link options not imported :)
Subliminal : please fix it.
Comment #49
yktdan commentedI just converted from most recent V2 to V3.0 and got hit with the pager bug. Fixing them after the conversion works, but it doesn't address the broken views in panel panes where the pager numbers are ignored and it displays all the rows. This seems more random, i.e. I don't see the pattern, some work and some don't.
The upgrade from V2 to D7 V3 also has the same problems and editing the views works and even if the bugs were fixed wouldn't fix all the views issues because many of the cck fields also got lost in the upgrade. We are still fighting our way through the 6->7 transition because of many conversion issues. Not enough time has been spent by developers on the upgrade path (yeah I know that is not sexy and I too would rather follow the bright shiny object that is the future).
Comment #50
ohthehugemanatee commented@merlinofchaos
Noting that this workaround no longer seems to work. I tried this procedure with Views Bulk Export and with Features, and had the pager problem in both. Here's the step-by-step I followed:
* Export all your views into bulk export or Features.
* Ensure Views considers them all "default".
drush fr my_views_feature --force -y* Upgrade Views.
drush dl views-6.x-3.x-dev -y-- Test the pager --
* try re-exporting your Views.
drush fu my_views_feature -y-- Test the pager --
* try just saving your views instead.
git checkout sites/all/modules/features/my_views_featurethen edit/save each one manually.-- Test the pager --
The pager settings were lost in all three tests. Is there a step I'm missing here? Is there a conversion tool like there was from Views 1 to 2? The views_update_60xx() hooks don't seem to have anything to do with this, so I didn't bother running the db update during this test.
Comment #51
aaronbaumanI applied this patch after updating from 6.x-2.x-dev to 6.x-3.x-dev
Builds on #28, but addresses a few missing pieces.
After updating to 6.x-3.x, successfully updated to un-patched 7.x-3.x and maintained pager settings.
Explanation in comments inline.
Comment #52
aaronbaumanComment #53
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue
Comment #54
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue