When I uncomment line 30 settings are not saved correctly!

Screenshot 1

When I change sitewidetextchange.php and uncomment line 30 as per the instructions,
and I try something like screenshot 1.

Screenshot 2

When I save it, it changes to screenshot 2. So the next time I add a new text I have to change everything else again too.

How to fix this?

  • J.
    • WPMU DEV Initiate

    I uncommented this line:
    define( 'SWTC-BELTANDBRACES', 'yes' );
    From the sitewide text change plugin.

    When I then put in a word in (See screenshot 1)
    'Find this text' like 'WordPress'

    and in 'and replace it with' let's say 'Company'.

    And I press 'Save all settings' button,
    I get the result of screenshot 2.

    So 'Find this text' changes from 'WordPress' to 'Company'
    and 'and replace it with' stays as 'Company'.

    So when I later on add a new word to find,
    I have to do all the other words over again too.

  • Barry
    • DEV MAN’s Mascot

    Ah, right - got you now. Out of interest, why are you uncommenting the line? It does say that it is experimental and may mess up a system, and it really isn't needed unless there is something that isn't being changed in the admin area.

  • J.
    • WPMU DEV Initiate

    @masonjames
    I uncommented the line because I have a theme installed
    that needs to be translated in the back-end. But hasn't got a language file.
    When I leave as is, it won't translate the phrases of the theme in the back-end.

    @Barry
    See above ^ :wink:
    True, I noticed but hoped that it could be fixed in some way.

  • J.
    • WPMU DEV Initiate

    I resolved it a bit.

    First I add some translations and save the changes.
    Then uncomment line 30. Then the 'Find this text' will all be changed to the
    field 'and replace it with'. But when I comment line 30 again.
    And upload it back, and refresh the page, it will all be fixed again.
    So then I don't have to do all over again, just first have to comment
    line 30, and then save. Then uncomment line 30 and all will be
    translated.

    Not ideal, but it works for now! Maybe you can fix it later, is a great plugin
    especially when this little bug is out.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.