Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have installed custom pub with Drupal 7.39 and it's not saving the new custom pub values.
I can create a new custom publishing options but when I check the new custom option in the node this is not saved, always appears unchecked.
After a manually cache clear in admin/config/development/performance starts working.
Comment | File | Size | Author |
---|---|---|---|
#8 | hard-cc-2576939-8.patch | 823 bytes | oriol_e9g |
Comments
Comment #2
dtamajon CreditAttribution: dtamajon commentedI have the same issue. I'm using Drupal 7.39 too.
Comment #3
dtamajon CreditAttribution: dtamajon commentedFor additional info, I checked with 7.x-1.3 and dev versions.
Comment #4
dtamajon CreditAttribution: dtamajon commentedSolution: after you create a new option you must clean caché before start using it.
Maybe could be added some additional info after saving the new option, like: "Please, clean the cache to apply the new options. If you don't, changes on node types can be not applied."
Comment #5
oriol_e9gYes, seems that
cache_clear_all('*', 'cache', TRUE);
it's not sufficient.I have replaced by
drupal_flush_all_caches();
and now it's working without manually clearing the caches.I have attached a patch.
Comment #6
oriol_e9gComment #7
oriol_e9gComment #8
oriol_e9gProper patch.
Comment #9
oriol_e9gComment #11
kevinquillen CreditAttribution: kevinquillen commentedI demoed this locally on a bare D7 site and the performance implications of this change were very noticeable.
In the interest of devs who are working on huge sites, we should update the overview page to inform the user that they should clear their caches after adding/updating publishing options, and that they should create/edit everything they need up front, then clear the cache.
Wiping cache on each save could take down moderately trafficked websites out there so I would rather put that control in the admins hands.
Comment #13
kevinquillen CreditAttribution: kevinquillen commentedComment #14
oriol_e9gThe new message is not translatable. Can you put the text inside t() function?
Comment #16
kevinquillen CreditAttribution: kevinquillen at Velir commented.
Comment #17
kevinquillen CreditAttribution: kevinquillen at Velir commented