• This is a resurrected version of This Post. I thought I had it fixed. One week with no problems and now it’s come back again.

    I’m using Multiple Content Blocks plugin (the only plugin in my system).

    I’m finding that occasionally (enough to be unacceptable) when editting page content the new lines (p and br tags) are lost.
    Checking in the database the way it should be working seems to be thus:
    – that when reading the record off the database wp_postmeta table it should convert hex 0D 0A (c/r, n/l) into br and p tags.
    – when displaying the edit field these p and br tags are shown as newlines in the text version of the display, but it suppresses the br tags in the html version. Sometimes however this seems to fail, and the newlines are not shown and the br and internal p tags are therefore lost.
    – when I press update. it saves the edit field with p and br tags replaced by hex 0D 0A. If however the newlines have been lost at the display stage, then the text is written back with no newlines in it.

    Has anyone met a similar problem, or got any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Cerddaf

    (@cerddaf)

    On using MyPhpAdmin to inspect two fields, one with newlines, one which has lost them, I find that the 0D 0A lines have gone missing in the case which fails.

    Both fields currently display OK in the public front end, but this is almost certainly because of caching, as changes made manually to the failed record with PhpMyAdmin are not reflected in the public front end

    So the story is that usually the admin edit function works fine, but sometimes it writes the correct version to the cache and a newline-stripped version back to the database.
    But we don’t know why only sometimes, and we don’t even know it’s happened until we go and look at the database again.

    Can anyone point me at the code which handles these updates

    Thread Starter Cerddaf

    (@cerddaf)

    We have traced this problem to the plugin reading from the database.

    In admin mode the data sent to the PC should contain P and BR tags, which should have been inserted by the plugin at every new line.
    thus:
    {p}Wow…she pegged him like she had her thumb on his stubborn little head…lol. Amazing and great advice. …. {strong}{/strong}{/p}
    {p}{strong}Anne from the UK{/strong}{/p}

    However sometimes this fails, and the server downloads the data without the P and BR tags, thus:

    Wow…she pegged him like she had her thumb on his stubborn little head…lol. Amazing and great advice. …. {strong}{/strong}

    {strong}Anne from the UK{strong}/blockquote>

    * angle brackets replaced by curly brackets.

    Suggestions on how to proceed would be welcome.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple Content Blocks plugin losing newlines in admin (again)’ is closed to new replies.