• Resolved rrrFer

    (@rrrfer)


    Hello. I use the old version of wordpress, i.e. when you switch to WordPress 5.x, your plugin stops working normally.

    1. After editing the article, the formatting of the code constantly disappears, i.e.

    int main () {
      int a = 0;
      if (a == 0) {
        cout << "hello";
      }
      else {
        cout << "world";
      }
    }

    Turns into:

    int main () {
    int a = 0;
    if (a == 0) {
    cout << "hello";
    }
    else {
    cout << "world";
    }
    }

    or even into something like:
    int main () {int a = 0; if (a == 0) {cout << "hello";} else {cout << "world";}}

    I do not know why it depends.

    2. part of the characters immediately replaced. For example, < on <

    Those. in the visual editor I will see what is written above, and in the source code will be

    cout & lt; &lt ; “hello”
    instead
    cout << "hello"

    3. Part of the code disappears altogether

    eg

    #include <iostream>
    int main () {
    }

    Converted to

    #include
    int main () {
    }

    And the saddest thing is that the source code of the page is modified, i.e. if there is no backup, then it is impossible to restore what was.

    It seems to me that this is not a complete list of problems.

    • This topic was modified 5 years, 9 months ago by rrrFer.
    • This topic was modified 5 years, 9 months ago by rrrFer.
    • This topic was modified 5 years, 9 months ago by rrrFer.
    • This topic was modified 5 years, 9 months ago by rrrFer.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Andi Dittrich

    (@andi-dittrich)

    Hi rrrfer,

    generally there are no known compatibility issues in WP5 – the plugin is running on over 10k websites without worries – therefore i believe your problem is related to some external plugins or a very special use-case

    first of all i need more informations to investigate the issue:

    1. do you use the “Classic Editor” plugin or the new “Gutenberg Editor” ?
    2. did you use the “Convert to Blocks” feature of Gutenberg to transform your legacy page to blocks ?
    3. or do you still use the “classic block” within Gutenberg ?
    4. did you try to reproduce the issue within a “clean environment” ? (new WordPress test installation) ?

    i need a detailed step-by-step explanation how to reproduce the issue…sry for that but it is very difficult to debug such problems.

    best regards, Andi

    btw. WordPress supports post revisions for a long time…each content change can by rolled back!

    Thread Starter rrrFer

    (@rrrfer)

    The problem, however, was before, but not so global.
    Watch it.

    1) I stopped all plugins except Enlighter – Customizable Syntax Highlighter.

    2) I now have WordPress 4.9.9 (I’m showing what the problem was BEFORE)

    3) I created a theme for the test with the following content:
    [cpp]
    int foo (int value) {
    if (value)
    return 0;
    return 1;
    } [/cpp]
    It seems to me that this is a classic editor. I attached a screenshot just in case. I always use text mode, because Visual does not work at all with your plugin.

    2019-02-07-18-57-48

    4) I switched to the visual mode (called the button) in the editor. The screenshot shows that the formatting has already disappeared.

    2019-02-07-19-02-39

    5) I switch again to text mode. We see that the formatting is gone with the ends. At the same time there is a replacement <on Lt; and so on.

    2019-02-07-19-02-45

    —–
    Why do I suffer so much when everything works well on 10 thousand sites? ((

    In WordPress 5, it became even worse, there I can no longer work even in text mode.

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    you’re using shortcodes and switch between editors…thats the issue… Enlighter Shortcodes are designed to work in text editor mode (shortcodes are also deprecated in 5.0..).

    the problems you’ve experienced are caused by a lot of WordPress internals as well as TinyMCE who are trying to modify the “text content”. by using the text mode you have to write valid html code…this also includes to escape specialchars (and that is not related by Enlighter).

    By working in Text Mode ONLY Enlighter will also work by using the “low level shortcode processor”…but switching to the “Visual Mode” triggers the editor filters which are doing this “weird” transformations (the editor assumes that everything is text content)

    To avoid such kind of issues i’ve created the editor plugins (TinyMCE and Gutenberg) – they make the sourcecode “immutable”.

    best regards, Andi

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    Thread Starter rrrFer

    (@rrrfer)

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘problems in the transition to WordPress 5.x’ is closed to new replies.