Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
Using Features or using Views UI, I am trying to stage one of my views. It have one of its displays which more link option is overriden to always show a more link with custom text. It works well on my dev environment but when deploying this view to my staging server, the more link is activated but its options are resetted to default values.
I attach you the export of this view.
This bug was found in 3.3 and today's dev version.
Regards.
Comment | File | Size | Author |
---|---|---|---|
#18 | views-1557680-18.patch | 2.11 KB | tim.plunkett |
#13 | 1557680-use_more_always-defaultable_sections.patch | 2.02 KB | dawehner |
#6 | views-export.txt | 20.11 KB | DuaelFr |
#5 | views-1557680-5.patch | 1.54 KB | tim.plunkett |
#3 | views-1557680-3.patch | 1.26 KB | tim.plunkett |
Comments
Comment #1
dawehnerI'm a bit confused about this issue ...
There are two options here: use_more_always and use_more_text. The second one works pretty fine, if you change it, it gets added to the export.
The first one, though is kind of special, it's logic is changed on saving/loading.
Technical "use_more_always" works as "use_more_not_always", as having it checked runs a count query. There are some historical reasons for that.
So if you have checked it, it will not be exported, but if you have not checked it, it will be exported as TRUE.
Here is the problem.
If you force to always export this this value, it should work as expected ...
Before committing this i require some feedback.
Btw. thanks for the flattr!
Comment #2
tim.plunkettWeeeeird. Makes some kind of sense though.
Comment #3
tim.plunkettInstead of hardcoding an odd hack, why not provide another export method (that might actually be useful in other ways).
Comment #4
dawehnerAwesome, it's so much better...
Comment #5
tim.plunkettIf you didn't commit already, here's a mention of it in option_definition.
Comment #6
DuaelFrThank you for your quickness but it do not solve the problem.
On my local environment I updated views to 3.x-dev, applied #5 patch and rebuilt the feature
Then on my staging server I updated and patched views before reverting the feature
The options are found in the feature
but "use_more_always" and "use_more_text" are not set during the importation.
Comment #7
DuaelFrHi guys !
I just made some tests on an other project.
I tried to use Features to stage it, the export code looks great but nothing happens on the staging server.
I tried to user export/import's views interface, same thing.
It is really painful to manually change each display using this feature.
You two are really good people who knows Views in depth so, please, give it a look.
When Views will go in core, you won't like to find bugs like this one, certainly easy to fix but needing a complete core release to be deployed...
I can help on anything else but Views is really too complicated for me ;)
In advance, thank you.
Comment #8
cobian.h CreditAttribution: cobian.h commentedTried patch #5 on fresh Drupal install with only using views, views_ui, ctools, views content panes (all latest dev)
.. still not working :(
Comment #9
rudiedirkx CreditAttribution: rudiedirkx commentedThe issue is not the export, it's the import. The export has the right data for each display:
yet the import ignores the
use_more_text
. (Theuse_more
flag is imported correctly though.)New export (of that wrongly imported view):
Where the text at?
Comment #10
ericclaeren CreditAttribution: ericclaeren commentedSame problem, a view export or feature is not imported correctly.
Comment #11
DuaelFrI am willing to pay for this !
Feel free to contact me...
Comment #12
jojonaloha CreditAttribution: jojonaloha commentedHaving same issue here, mainly with the use_more_text option. Haven't reviewed the code yet to see if I can help contribute to a patch, but some things I've noticed.
When I export the view using features, the export put the use_more_text option on that display (which I would expect since I clicked "Apply (this display)"), but when I revert the feature/view locally or on the staging server the text is "more" instead of my custom text. When I export the view using the Views UI the use_more_text is on the Master display, and reverting that view after copying the change to the feature works fine.
Here is a diff to illustrate what I mean:
Comment #13
dawehnerJust made a bit of a progress after some research:
This patch contains the changes from #5 for a better export of use_more_always and the changes in this comment.
Comment #14
DuaelFrLadies an gentlemen!
THIS IS
SPARTARTBC !!Champagne!
Comment #15
dawehnerThanks!
Just to mention you have to reexport your views to make this working.
Comment #16
DuaelFr(detailed) Bug Driven Test :
- installed Views 3.x
- created a view with a display block using a more link and not using default
- exported in a feature
- deployed on a staging server
--> more link is not imported (bug confirmed)
- patched Views with #13
- exported the view again
- deployed on the staging server
--> more link is well imported ! Cheers !
Thank you again Daniel
Comment #17
dawehnerIt works for DualFR so lets get it in. Thanks for the testing!
Committed to 7.x-3.x, though this patch doesn't apply clean to 8.x-3.x
Comment #18
tim.plunkettPorted.
Comment #19
aspilicious CreditAttribution: aspilicious commentedsame
Comment #20
dawehnerThis is also in!