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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oriol_e9g created an issue. See original summary.

dtamajon’s picture

I have the same issue. I'm using Drupal 7.39 too.

dtamajon’s picture

For additional info, I checked with 7.x-1.3 and dev versions.

dtamajon’s picture

Solution: 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."

oriol_e9g’s picture

Status: Active » Needs review
FileSize
771 bytes

Yes, 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.

oriol_e9g’s picture

Title: Custom pub don't work with node revisons » Custom pub option it's not saved without a manually cache clear
Issue summary: View changes
oriol_e9g’s picture

Issue summary: View changes
oriol_e9g’s picture

FileSize
823 bytes

Proper patch.

oriol_e9g’s picture

  • kevinquillen committed e29a114 on
    Flush all caches so the changes are picked up immediately. [#2576939]
    
kevinquillen’s picture

I 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.

kevinquillen’s picture

Status: Needs review » Fixed
oriol_e9g’s picture

The new message is not translatable. Can you put the text inside t() function?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kevinquillen’s picture

.

kevinquillen’s picture