Page 1 of 1

Force Caching of older(?) entries

Posted: Fri May 20, 2011 8:53 am
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

Re: Force Caching of older(?) entries

Posted: Fri May 20, 2011 3:49 pm
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.

Re: Force Caching of older(?) entries

Posted: Fri May 20, 2011 8:09 pm
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

Re: Force Caching of older(?) entries

Posted: Sat May 21, 2011 10:24 am
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}

Re: Force Caching of older(?) entries

Posted: Sat May 21, 2011 10:43 am
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

Re: Force Caching of older(?) entries

Posted: Sat May 21, 2011 11:08 am
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.

Re: Force Caching of older(?) entries

Posted: Sat May 21, 2011 11:19 am
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