Hi Jerry,
the only thing I was able to reproduce, was just what Gert described: a momentary loss of synchronization just on on the screen, with no influence on the stored data. So did this
Jerry wrote:After this the page_param file is ouf of syncronization with content.htm.
really happen?
But anyway: The problem is that after saving a page CMSimple refreshes the content (in admin.php - rfc()), but this happens after all the plugins have been loaded. So they just don't know about the changes. I think this should fix the problem: Instead of re-reading the content in this stage, CMSimple should completely restart with the new url. So I tried this code as a replacement for the rfc in the ($adm && $f == 'save') { ...} clause in adm.php (~ l. 328):
Code: Select all
/* check for the first heading */
preg_match('~<h[1-' . $cf['menu']['levels'] .'][^>]*>(.+)</h[1-' . $cf['menu']['levels'] .']>~iu', $text, $matches);
if(count($matches) > 0) { /* If there is one: construct the new $su from it */
$temp = explode($cf['uri']['seperator'], $selected);
array_splice($temp, -1, 1, uenc(trim(strip_tags($matches[1]))));
$su = implode($cf['uri']['seperator'], $temp);
} else { /* If there is no heading, the page has been deleted: set $su to the previous page */
$su = $s > 0 ? $u[$s -1] : $u[0];
}
/* and now call the new $su */
header("Location: " . $sn . '?' . $su);
I am curious if that really solves the problem. So, feedback and tests with the attempt to destroy the synchronization, are very welcome.
And about your scheduling addition to page_params: I just reread the old
discussion. Is your download link still up-to-date?
Update: Changed the previously hard-coded "3" to "$cf['menu']['levels']".
KR
Martin