Lost content with memberpages, page_params

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!

Lost content with memberpages, page_params

Postby Martin on Mon Mar 08, 2010 7:35 pm

There have been some reports on trouble with lost content and memberpages-plugin. The only way I found to reproduce it was to do the following:
  1. save a page
  2. change to view-mode
  3. use your browser's back-button
Of course you should not do so, and your browser will warn you not to do it, but anyway, it happens.

The plugins memberpages, page_params and register, maybe some more, use #CMSimple hide# to hide pages when you are not in edit-mode. But if you do the above your are able to fool them: Then CMSimple is not in edit-mode (!$edit && $adm) any longer, and you save the content in the wrong way again.

I think this issue can be solved by setting $edit to true before the plugins are loaded, when the page is going to be saved. In cms.php - ca. l. 170:
Code: Select all
// Plugin loading
//add this line
if($function == 'save'){$edit = true;}
//before
if ($cf['plugins']['folder'] != "")include($pth['folder']['plugins'].'index.php'); 


Please test it and report, if your content has been overwritten with "#CMSimple hide#" in any other way!

Martin
Martin
 
Posts: 439
Joined: Thu Oct 23, 2008 11:57 am

Return to Open Development

Who is online

Users browsing this forum: No registered users and 1 guest