• Resolved svenster7

    (@svenster7)


    I have tried just word and regex substitution replacement and neither have worked. I am just using a simple word but it isn’t being replaced. The text isn’t AJAX generated and I tried just searching and replacing just the word head and it wouldn’t work. Is there any way to turn on debugging?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    There is no debugging for the regex. Technically there isn’t a bug, but rather the regex isn’t matching anything based on the way you’ve written it.

    One thing that often trips up regex users is that they don’t start and end the Find with a forward-slash i.e. /. So it should be /rule/ and not just rule.

    If the above doesn’t fix your issue, paste the rule here.

    Thread Starter svenster7

    (@svenster7)

    I’m not even trying regex now just trying to replace “head” -> “baby” and it isn’t. I tried
    head -> baby
    /head/ -> baby

    What is the simplest test I can do to see if it works at all?

    https://www.dropbox.com/s/5sjzd1jk18pdg3j/far.png?dl=0

    • This reply was modified 8 years, 3 months ago by svenster7.
    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    I don’t see anything that would keep that from working. It’s as basic a rule as you can get so it’s a good one to test with.

    Any chance you’ve got caching and you’re seeing the cached version of the page?

    Would you be willing to post a URL so I could look at the page’s source in my browser?

    Thread Starter svenster7

    (@svenster7)

    http://www.valeriekayphotography.com:88

    I verified the plugin runs but the output seems to be ignored.

    I added the following to the plugin

    function far_ob_call( $buffer ) { // $buffer contains entire page
            file_put_contents('/tmp/test.before', $buffer);
    ....
            file_put_contents('/tmp/test.after', $buffer);
            return $buffer;
    }

    After I ran it I ran diff against the index.html returned by wget and the test.before file and had this. No replacements were made. Is there some kind of ordering for plugins and far needs to run after?

    1014c1014,1034
    <                 <!-- ngg_resource_manager_marker --><style type="text/css">
    ---
    >                 <!-- ngg_resource_manager_marker --><script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-includes/js/underscore.min.js?ver=1.8.3'></script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-includes/js/backbone.min.js?ver=1.2.3'></script>
    > <script type='text/javascript' src='https://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201809'></script>
    > <script type='text/javascript'>
    > /* <![CDATA[ */
    >
    > var nextgen_lightbox_settings = {"static_path":"http:\/\/www.valeriekayphotography.com:88\/wp-content\/plugins\/nextgen-gallery\/products\/photocrati_nextgen\/modules\/lightbox\/static","context":"all_images_direct"};
    > /* ]]> */
    > </script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js?ver=2.2.46'></script>
    > <script type='text/javascript'>
    > /* <![CDATA[ */
    >
    > var nextgen_shutter2_i18n = ["Previous","Next","Close","Full Size","Fit to Screen","Image","of","Loading..."];
    > /* ]]> */
    > </script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/lightbox_context.min.js?ver=2.2.46'></script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/shutter.min.js?ver=2.2.46'></script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/shutter_reloaded/nextgen_shutter_reloaded.min.js?ver=2.2.46'></script>
    > <script type='text/javascript' src='http://www.valeriekayphotography.com:88/wp-includes/js/wp-embed.min.js?ver=4.9.4'></script>
    > <style type="text/css">
    
    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    This plugin will run after all others. It works with the output buffer so everything should be done running by that point.

    Is there currently an active rule? If not, can you put a non-regex one
    like this which will have no impact, but be visible to us.

    Find: </head>
    Replace: </head><!– RTFR Plugin –>

    I see there is a caching plugin running. Can you try accessing the URL where a replace should happen and append ?param=value e.g.

    https://www.valeriekayphotography.com/?param=value

    That’ll force the cache to refresh or be ignored. Param and value can be anything you want.

    Hello Sir,
    I love your plugin and mostly I use this plugin for some code error on the website. But this time it doesn’t work as accepted.
    Please Visit: http://prntscr.com/imxouk, in this I tried to put the code and replace it but it doesn’t show changes after updating.
    And even I tried simply text also but still, it doesn’t show the correction.
    Please visit: http://prntscr.com/imxom4

    Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    @svenster7 I’m hoping all is good since you didn’t reply.

    @hiteshchoudhary Please start your own thread if you continue to have issues.

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

The topic ‘Text not changing’ is closed to new replies.