mysql str replace takes only effect after manual saving

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
peggylon
Regular
Posts: 51
Joined: Tue Jul 01, 2008 6:32 pm
Location: Berlin
Contact:

mysql str replace takes only effect after manual saving

Post by peggylon »

Hello,

a couple days ago I switched to a new template. For better looks I then added some additional HTML to a recipe scheme I used to use. Manually this worked (and looked) just fine. In order to adapt these changes to previos entries I did string replace that portion in body.

UPDATE multikuli_entries SET body = replace(body, 'stringtobereplaced', 'newstring');

No problems so far. But the changes didn't become visible. When opening an entry in backend and saving it, then the desired effect too place. Cache was cleared several times.
Is there a way to somehow simulate manual saving? I'd rather not want to open and save each single entry containing the recipe scheme...

I'm still on s9y 1.7.. Do you think updating to 2.0 could solve the problem?

Thanks for your time
----------
peggylon aka multikulinaria http://www.multikulinarisch.es
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: mysql str replace takes only effect after manual saving

Post by garvinhicking »

Hi!

I suppose you have the entryproperties plugin enabled, which offers caching, and saves that in serendipity_entryproperties. Either you do this string replacement there too, OR you disable caching, OR you rebuild the cache (should be an option in your entries menu in the backend, like "Recreate Cache of all entries").

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
peggylon
Regular
Posts: 51
Joined: Tue Jul 01, 2008 6:32 pm
Location: Berlin
Contact:

[SOLVED] mysql str replace takes only effect after manual sa

Post by peggylon »

Hi Garvin!

You were right about
garvinhicking wrote:you have the entryproperties plugin enabled, which offers caching, and saves that in serendipity_entryproperties
I had not been sure about using the backend cache function. I thought it would freeze entries the way they were displayed on the blog. But since you suggested so, I tried and it worked perfectly. The changes are now visible in all recipe entries.

Thank you so much!
cheers
----------
peggylon aka multikulinaria http://www.multikulinarisch.es
Post Reply