I have two page view displays in the same view for displaying and sorting a particular content type. Module version is 7.x-2.0+21-dev.
I am facing the following problems, after following the README included in the module:
- When creating 2 displays in the same view, the "display view" cannot access the "sort" view, I suppose because the view is not yet saved. This might be OK, but when I check the Draggableviews sort field in the main view it selects any pre-saved sort view it can find, even from a totally different view, this is confusing.
- When going to the sorting view, I see that all weights are set to an equal value (at least when I click on show weights). e.g. for 5 rows, all show a weight of -5, even though different weights were set last time I saved the order. This is peculiar. Note that the order view does show the last saved order regardless off the weight shown...
- I can basically not get the order of the sorting page to be taken into account in the main view display, even though both views have the same sorting criterion with asc order.
- "Order view" contextual link is not shown. I have not changed any permissions yet, but I suppose it should work for the administrator (user 1), right?
- After disabling the argument usage to see if it matters for the sort and saving the view, I encounter PHP memory size error for both the original and display view, even though memory_limit is set to 128M in php.ini:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1626 bytes) in C:\xampp\htdocs\salsaspring\sites\all\modules\views\plugins\views_plugin_display.inc on line 76
Thus, I am left with a broken view. Tried recreating it or cloning if from another view that works (although the sorting doesn't work there either), but I again got the PHP error after a few edits. Also now I cannot even edit the working views because I get memory size errors in the AJAX when editing the view.
I am attaching an export of the view in case it helps.
Thank you in advance
Comment | File | Size | Author |
---|---|---|---|
view_export.txt | 10.28 KB | marktheshark |
Comments
Comment #0.0
marktheshark CreditAttribution: marktheshark commentedadditional info
Comment #1
marktheshark CreditAttribution: marktheshark commentedNote that deleting the sorting view and the sorting criterion in the main view makes it work again (albeit, without any particular sorting order).
Comment #2
iStryker CreditAttribution: iStryker commentedI'll give my 2 cents on this issue.
You are using views slideshow. To my knowledge this module uses alot of memory as it uses image style. Again to my knowledge image styles uses alot of memory. (I could be totally wrong in this)
I used eclipse IDE to walk through the code function by function to solve another problem/issue. In the code, I notice that the views were loaded multiple times. Some of them seem to be unnecessary, but I could not be for sure.
I cannot benchmark your example, as I do not know what other modules you have install.
It would be nice if we could benchmark
In your case I would add 3 more test.
This issue is definitely not major, as you can just increase the PHP limit.
Comment #3
marktheshark CreditAttribution: marktheshark commentedI know the memory limit can be raised, but more than 128 MB of memory for a view?
I have disabled DraggableViews for the time being, perhaps I'll use custom sorting via another field or check out nodequeue.
Comment #4
Dubs CreditAttribution: Dubs commentedI have the same issue here. I upped to memory to 512M but it still maxes out. It seems to eat up whatever it's given!
Comment #5
iStryker CreditAttribution: iStryker commentedThere must be an infinite loop in the code then.
@Dubs, are you using view slideshow too? If not, what is your view? Is it simple or complex? Does it have an image field.
Comment #6
Dubs CreditAttribution: Dubs commented@iStryker - thanks for getting back so quickly.
I'm using a view with the following displays: -
What's interesting is that it was working until I added the sort criteria on the page with images. The sorting was fine on the 2nd page and the menu view attachment. The memory problems occurred as soon as I added the sort criteria to the page with images.
Comment #7
iStryker CreditAttribution: iStryker commentedAwesome feedback @Dubs. I think a line by line walk-thorough in Eclipse is in-order to find the bug. I will not have time to test this for atleast a week.
In the meantime, can you test something for me...
Does the new view give you the php memory limit error?
Comment #8
DenisVSsame this problem
---upd
Pager must be less infinity, e.g. not zero.
Comment #9
Dubs CreditAttribution: Dubs commentedHi, sorry for the delay in responding... I changed my view to get to work with the default taxonomy ordering and it took a while for me to change it back for this test.
Yes, the issue appears to go away when I have the ordering page on a separate view.
Comment #9.0
Dubs CreditAttribution: Dubs commentedformatting
Comment #10
markus_petrux CreditAttribution: markus_petrux commentedHi!
This issue also happens in 8.x... the code enters in a never ending loop when draggableviews tries to compute the depth when item has parent. The id of the parent seems to be set as the same id of the item, so the index is the same and the method keeps recursing itself.
No idea where the root of the problem is. :(
Cheers
Comment #11
jordan.jamous CreditAttribution: jordan.jamous at Eighty Options commentedHi, I agree with @markus_petrux . Currently I am trying to upgrade from 1.0 to 2.0.1. Somehow on reordering an element, draggableviews[x][id] value gets copied into draggableviews[x][parent], causing DraggableViews::getDepth() function to go into an infinite loop. This is on a fresh install of drupal 8.9.18 on bootstrap or seven theme.
I have no idea why the JS behaves this way, I tried to lookup for any bugs in core tabledrag.js found nothing. I will open a new ticket and supply a workaround to the infinite loop.I may have a look if this happens on 9.x as well.
Note that I followed the README.md on 2.0.1 to install the module, but I think it might need to be revisited as it is a bit confusing (I would revise it myself but I can't get the draggable behaviour to work :| )
Thanks all of the hard work