Menu

#228 Online-Edior removes <phpcms:ignore> Blocks

phpCMS_1.2.1pl2
open-fixed
Editor (15)
5
2006-01-04
2006-01-04
No

If a block in a content file is surreounded by
<phpcms:ignore>...</phpcms:ignore> tags and this
content file is edited and saved with the online
editor, the entire content between those two tags is
missing in the saved file.

The reson is, that phpCMS removed those "ignored" lines
right after reading the content file into memory and
therefore they don't exist any more at the time the
online editor is saving the new version.

To fix this bug would probably need a complete redesign
of the method phpCMS uses to handle
<phpcms:ignore>...</phpcms:ignore> blocks.

ciao.. Iggi

Discussion

  • Martin Jahn

    Martin Jahn - 2006-01-04

    Logged In: YES
    user_id=607933

    To fix this bug we have to replace line 82 in class.parser_file_phpcms.php:
    $lines = preg_replace ("'<phpcms:ignore>.*?</phpcms:ignore>'si", "",
    $lines);

    with the following

    if(!isset($DEFAULTS->EDIT) || $DEFAULTS->EDIT !== 'on' ||
    $DEFAULTS->DOEDIT !== 'on') {
    $lines = preg_replace ("'<phpcms:ignore>.*?</phpcms:ignore>'si", "",
    $lines);
    }

    This inhibits the replacement if the online-editor is on and if you are in EDIT-mode.
    If you are only in VIEW-mode, then anything would work as normal.

     
  • Martin Jahn

    Martin Jahn - 2006-01-04
    • assigned_to: nobody --> mjahn
    • status: open --> open-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.