Forum Replies Created

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

    (@cerddaf)

    Found the problem, though not the solution.

    The problem is not this excellent plugin, which I have unjustly maligned.

    Activating or deactivating any plugin rewrites .htaccess, which breaks the system.

    This is presumably something to do with the original design of the website, which I had no part in.

    Thread Starter Cerddaf

    (@cerddaf)

    Found the answer.

    The menu items are a list, each entry is made up of 2 parts, the bullet or item nr, and the text.
    The first part is empty, because no symbol is specified, but the space is there.

    So the solution is to adjust the Left field as shown below.
    (The numbers might need to be adjusted for your needs)

    #access ul ul {
            box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
            -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
            -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
            display: none;
            position: absolute;
            top: 38px;
    <strong>        left: -30px;     /* displacement of level 2 menu  from level 1*/</strong>
            float: left;
            width: 180px;
            z-index: 99999;
    }
    
    #access ul ul ul {
            <strong>left: 75%;   /* displacement of level 3 menu from level 2 */</strong>
            top: 0;
    }
    Thread Starter Cerddaf

    (@cerddaf)

    I found a fix which works (at least I’ve not managed to break it yet)

    Add a new call to admin_head hook to force editor in stored cookies to be tinymce, so everything is always output formatted (not raw htlm), regardles of the format in which it came in.

    Here is the code, complete with the commented out diagnostics.

    function multiplecontent_css() {
    /* force tinymce as editor for the additional blocks */
        force_tinymce();    <======== add this line
    
        echo '
        <style type="text/css">
            .js .theEditor, #editorcontainer #content {
                color: #000 !important;
                width: 100%;
            }
        </style>
        ';
    }
    
    /**
    force tinymce as editor
    */
    function force_tinymce() {    <===== add this function
        global $_updated_user_settings;
    //echo("<br /> force_tinymce: ");
    
        if ( ! $user = wp_get_current_user() )  return ;
    
        $OldCookie = $_COOKIE['wp-settings-' . $user->ID];
        $NewCookie = str_replace( 'html', 'tinymce', $OldCookie );
        $_COOKIE['wp-settings-' . $user->ID] =  $NewCookie;
    
    //echo("<br /> OldCookie: "); print_r($OldCookie); echo("<br />");
    //echo("<br /> NewCookie: "); print_r($NewCookie); echo("<br />");
        $ChgCookie = $_COOKIE['wp-settings-' . $user->ID];
    //echo("<br /> ChgCookie: "); print_r($ChgCookie); echo("<br />");
    
        return;
    }
    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.

    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)

    Thanks esmi,

    I shifted my theme out into a spare folder, and overwrote it with a clone of the default theme from my working testbed, then slowly added in my new stuff.

    It’s working now, so I conclude that somewhere in building my new theme I have deleted/amended something that the back office edit-page code uses.

    I don’t know what exactly it must be, but if it ain’t broke I ain’t going to fix it, expecially with a client who has been very understanding, but deserves to have his website complete ASAP.

    So thanks for your advice, much appreciated
    Cerddaf

    Thread Starter Cerddaf

    (@cerddaf)

    Thanks:

    I’ll try your suggestions, meanwhile I’ve done some more checks.

    Usng the normal WordPress edit page I enter the user text

    UK xxxxxText Readings

    Text ‘Skye’

    and your question to 78887

    £1.50 / reply. UK Callers Only

    The newlines are entered with the ENTER key.

    This gets stored in the database with the newlines stored as hex 0D 0A.
    It is then displayed correctly with 0D 0A replaced by <p>.

    The reply to the admin screen however displays as 1 line

    UK xxxxxText Readings Text ‘Skye’ and your question to 78887 £1.50 / reply. UK Callers Only

    When I check the source code of this edit page reply, the newlines are actually there as 0D 0A, but they are not showing as newlines.

    For comparison I went back to a test bed I set up before startimg this project, and checked in an additional Content block on that system. There the newlines are also 0D 0A, but they are displayed correctly.

    So it begins to look as if the problem is in the display of the additional content block in the wordpress standard edit page, and that there is something in my system which is breaking it, which is not present in the testbed system.

    Thread Starter Cerddaf

    (@cerddaf)

    OK esmi. Here’s the link and the additional information.

    The page I was working on is http://skye.net-commerce-solutions.co.uk/
    (Please note: this page is in development – content and layout are very much first draft)
    I set up the content blocks, started to add content and clean up the formatting.

    I got the central block “Isle of Skye Psychic Centre” looking OK, with paragraphing using p tags, then started on the LH block “The Magic of Skye”. After a couple of updates to this block I noticed that the centre block had lost all paragraphing.

    I then tried updating the LH block, noting what happened (using the HTML tab).

    1, I set up the block, with p tabs (here displayed as {p} tabs so as not to mess up the posting

    Here’s what I entered, and confirmed to be in the database using PhpMyAdmin. (note the p tabs

    (strong)The Magic of Skye(/strong)(p)

    (/p)Since the arrival of the modern industrial age, most people have lost touch with the aliveness of nature. Nevertheless, there are many of us who feel the throb of that aliveness in our bodies and long to restore a real connection, knowing it will help to heal and restore our energies and vitality.(/p)

    (p)The Isle of Skye is a place where the aliveness of nature is still palpable. Everyone who comes here feels its special energies immediately. It is so wonderful to move out of the mechanical time-bound world of modern life, from a world where most things are dead, to a world where you can feel the magical energies of revival and connection all around you.(/p)

    (p)Skye is a place where you can enjoy feeling connecte, where the sense of separation and isolation begins to dissolve. Here, you begin to experience your sense of oneness with everything around you. Whatever it is about this island, it is a very special place, and the vast majority of people who come here experience something that uplifts them.(/p)

    (p)There are some things that are really worth the effort, and to make the Isle of Skye one place that you can say you have visited, seen and experienced is one of those things – a unique and wonderful experience, just in itself.(/p)

    I then used the update in the admin page, and found that the p tags had gone, although the block was still paragraphed in the admin edit diaplay. The paragraphing appears to be with newlines, not with p tags. PhpMyAdmin confirms the entry now looks like this

    (strong)The Magic of Skye(/strong)

    Since the arrival of the modern industrial age, most people have lost touch with the aliveness of nature. Nevertheless, there are many of us who feel the throb of that aliveness in our bodies and long to restore a real connection, knowing it will help to heal and restore our energies and vitality.

    The Isle of Skye is a place where the aliveness of nature is still palpable. Everyone who comes here feels its special energies immediately. It is so wonderful to move out of the mechanical time-bound world of modern life, from a world where most things are dead, to a world where you can feel the magical energies of revival and connection all around you.

    Skye is a place where you can enjoy feeling connecte, where the sense of separation and isolation begins to dissolve. Here, you begin to experience your sense of oneness with everything around you. Whatever it is about this island, it is a very special place, and the vast majority of people who come here experience something that uplifts them.

    There are some things that are really worth the effort, and to make the Isle of Skye one place that you can say you have visited, seen and experienced is one of those things – a unique and wonderful experience, just in itself.

    This displays on the front end as a concatenated string, as at present.

    How should paragraph splits be entered an processed by the system?
    How can I stop (p) and (br) tags being lost in this way?

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