CR to modify default news overview - see attached before and after

Comments

Delphine Duprez’s picture

Assigned: Delphine Duprez » Babou

Bald, fine with me.

bald.herreman’s picture

over to babou then

Babou’s picture

Assigned: Babou » bart.hanssens
Status: Active » Fixed
bart.hanssens’s picture

bald.herreman’s picture

Assigned: bald.herreman » bart.hanssens
Status: Fixed » Needs work

NOK on minifed. Can you check?

http://minifed.rovin.be/nl/nieuws

bart.hanssens’s picture

Assigned: bart.hanssens » Echofive
Babou’s picture

Assigned: Echofive » bart.hanssens
Status: Needs work » Fixed

Forgot to mention that a drush rdss ofed_news is required as we have changed the Display Suite settings.

bart.hanssens’s picture

Assigned: bart.hanssens » bald.herreman
Status: Fixed » Active

Hmz ok, done on langfed and minifed, but I was expecting that such a change would be performed automatically using an hook_update()

Babou’s picture

I think it's better to keep using the drush command for this kind of issues as a hook_update will simply override any changes a builder could have make to the Display suite settings it you need to run the update script on their site.

Here it has to be done manually but it ensure that you do not override the display suite settings when you have to update something else on the site like a contrib module.

bart.hanssens’s picture

Ok, sounds reasonable, but is there a way to do a drush rdss on _all_ content types, instead of just one ?
Just like drush fra deals with reverting all features ?

That would make updating straightforward (just tell the admin to always run drush cc all; drush fra -y ; drush rdss --all or something along those lines)

Babou’s picture

Well, as it is implemented right now, it deletes the settings for the given content types then it inserts the new version instead of updating them.

The process doesn't check whether or not the submitted content type has been modified and assume you know what you are doing when you run the command.

So long story short, the command will completely replace the settings for the given content types, there is no merge or anything. It's quite a dumb function and it is not recommended to replace the settings all at once.

It can be implemented if needed but keep in mind that any changes will be replaced.

bart.hanssens’s picture

Ah so it is a custom openfed.drush.inc script... that's not good...

Updating really has to be straightforward, as sites are starting to move to production, we can't afford having to run separate (custom) scripts when switching versions (because, as you've noticed, it's easy to miss a script...)

Doesn't Display Suite support the Features module / could Features be used to solve this ?

Babou’s picture

When I first started working on OpenFed, I was told that the display suite settings were always read from the feature and not from the database. So whatever the changes, when you were going to display a node, Drupal was always going through the featured settings instead of the one stored in the database to render the node.

Meaning, that it just good for deploying a content type but once you want to change something, it was no longer an option to keep the feature enabled.

Hence the fact that now, the display suite settings are stored in an install folder in our feature and prefixed with an underscore. The file is included during the installation of the feature so it loads the DS settings.

And even if it works now with the latest version of Features, running a drush fra -y will revert everything anyway and do the exact same thing.

bart.hanssens’s picture

Status: Active » Closed (fixed)

OK for now, probably a more detailed analysis / procedure is required for future releases

  • Commit 5817c1b on 7.x-1.x, 7.x-1.7 by Babou:
    Issue #2096677: OpenFed News overview proposal
    

  • Commit 5817c1b on 7.x-1.x, 7.x-1.8 by Babou:
    Issue #2096677: OpenFed News overview proposal