Force Caching of older(?) entries

Creating and modifying plugins.
Post Reply
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Force Caching of older(?) entries

Post by danst0 »

Hi,

in a post some time ago garvin said:
This means, whenever a new markup plugin is installed, it would not affect old cached entries. This is why the hook "backend_cache_entries" was created, so that plugins on installing can invalidate the old cache and create the new one, including their content. The same functionality can be executed by the blog admin through the "Cache all entries" link in the sidebar menu.
Since reading that I am searching for that link. For caching I have the extended properties plugin installed.
Would I need to install another plugin or should the above mentioned link be already there?

Daniel
FishNiX
Regular
Posts: 40
Joined: Sun Sep 02, 2007 6:32 pm

Re: Force Caching of older(?) entries

Post by FishNiX »

Do you have "Allow to cache entries? " set to yes? I think yes is default.

I got that link once I installed the extendedproperties plugin. You could try deleting it and reinstalling. I've actually had a situation where I ended up with 2 links.
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Force Caching of older(?) entries

Post by danst0 »

Hi,

these are my preferences for the extended properties plugin. I am not really willing to remove and reinstall the plugin since I rely heavily on a custom field.

Isn't there another way to recreate the link? How come that it just vanishes?

Daniel
Attachments
Screen shot 2011-05-20 at 17.43.27.png
Screen shot 2011-05-20 at 17.43.27.png (46.57 KiB) Viewed 3642 times
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Force Caching of older(?) entries

Post by Timbalu »

the link depends on the variable
$is_cache = serendipity_db_bool($this->get_config('cache', 'true'));
have a look inside the db config table, if the entryproperties cache value is true or 1

I just switched around the cache true/false in the entryproperties config and regarded, the link will not appear right after submit. You have to use some other sidebar navigation link before, to have it created.

Do you have userlevel == admin?
if ($is_cache && $serendipity['userlevel'] >= USERLEVEL_ADMIN) { show link}
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Force Caching of older(?) entries

Post by danst0 »

both should be true...;-) (see screen shots)

But, I did some debugging in the code lines you mentioned. And it seems that my

Code: Select all

$serendipity['userlevel']
I used an

Code: Select all

echo ":".$serendipity['userlevel'].":";
and it is just empty...?

How come that this is not set? Where is this set anyway?

Daniel
Attachments
Screen shot 2011-05-21 at 10.29.42.png
Screen shot 2011-05-21 at 10.29.42.png (28.59 KiB) Viewed 3631 times
Screen shot 2011-05-21 at 10.30.03.png
Screen shot 2011-05-21 at 10.30.03.png (58.02 KiB) Viewed 3631 times
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Force Caching of older(?) entries

Post by Timbalu »

echo USERLEVEL_ADMIN . ' == ' . $serendipity['userlevel']; should be both 255.
To debug, put in right after line 474 ~ $hooks = &$bag->get('event_hooks'); and you can see it on top of your admin page or inside sidebar.

The userlevel value is in db serendipity_config userlevel value.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Force Caching of older(?) entries

Post by danst0 »

There was no userlevel value in my s9y_config... so I resaved my admin account in user management, now "255 == 255"...
And the link appeared!

Thanks for the help! Have a nice weekend, Daniel
Post Reply