WordPress.org

Forums

Shortcode Exec PHP
After upgrading to WP 3.3, it started adding (17 posts)

  1. drizzt99
    Member
    Posted 3 years ago #

    Hi,
    I've used this plugin successfully to add dynamic data to my pages.
    For some reason, after upgrading to WP 3.3,
    was added in some places to my HTML code that was echoed.
    Can you tell why?
    It happens only with shortcodes executed with this plugin.

    http://wordpress.org/extend/plugins/shortcode-exec-php/

  2. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    I have answered your question here.

  3. drizzt99
    Member
    Posted 3 years ago #

    Thank you very much for the quick reply.
    I'm an advanced user, and did not skip that part - trust me. The problem is not that output is not shown. The problem is that things are added to it.

    Here's an example.
    When I put this in the input:

    echo '
                   <script language="javascript" type="text/javascript">
                                    function calculatecomm()
                                    {
                                        senrol1 = document.getElementById("enrol1").value
                                        senrol2 = document.getElementById("enrol2").value
    					hoursPerDay = document.getElementById("enrol3").value
    
    					pointVal = 75000/19000000;
    					pointsPerHour = 5;
    					valPerMonth = pointVal*pointsPerHour*30*hoursPerDay;
    
                                     }
                                </script>';

    I get this in the output:

    <p>               <script language="javascript" type="text/javascript">
                                    function calculatecomm()
                                    {
                                        senrol1 = document.getElementById("enrol1").value
                                        senrol2 = document.getElementById("enrol2").value
    					hoursPerDay = document.getElementById("enrol3").value</p>
    <p>					pointVal = 75000/19000000;
    					pointsPerHour = 5;
    					valPerMonth = pointVal*pointsPerHour*30*hoursPerDay;</p>
    <p>                                 }
                                </script></p>

    This is inserting <p> into my code.

    I can give another example in which it inserts <br/> in my code if you want.

  4. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    WordPress is probably doing this.
    You can prevent it this way.
    Please let me know if this fixes your problem and I will consider making this a plugin option.

  5. drizzt99
    Member
    Posted 3 years ago #

    Thanks again :)
    It didn't help.
    I tried using the plugin suggested (wpautop-control) just in case it was my fault not knowing how to use the "remove_filter" (which I know, but hey, I might be wrong as well).
    Anyway, not my efforts and not the plugin's did the trick. Still comes up with <p> or <br/> that are not supposed to be there.
    Any other idea?

  6. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    Try the no-wpautop of the development version of the plugin.

    Do you have any caching enabled?
    Or plugins that could be responsible for this?

  7. drizzt99
    Member
    Posted 3 years ago #

    I currently have v 1.37. How do I use this feature?

  8. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    If you have installed the development version, then there will be new option in the settings page of the plugin called 'Disable wpautop'.

  9. drizzt99
    Member
    Posted 3 years ago #

    So I just install it? No need to uninstall/reinstall?

  10. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    You will have to uninstall the current version and to upload the development version. Be sure the option 'Delete options and shortcodes on deactivation (and when upgrading!)' is unchecked. Also be sure to use the correct download link (the one in the changelog).

    If you are unsure, you can follow these instructions (another plugin, but the process is the same).

  11. drizzt99
    Member
    Posted 3 years ago #

    Hi, just did a backup b4 to be sure :)
    I installed the dev version, ticked the 'Disable wpautop' and nothing changed.
    I also cleared the browser cache just in case (I have no WP cache plugin installed) although every change I do I can see...
    I disabled almost every plugin on the site...
    It still gives the same additional input for some reason.

  12. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    I have tested it on my development site and I don't see this problem (with or without the new option enabled).

    I can think of just one thing, maybe your theme is doing this.
    Try switching to the default theme.

  13. drizzt99
    Member
    Posted 3 years ago #

    I thought about it - with twenty eleven it has the same issue.
    The issue first showed up when I upgraded to WP 3.3. And it happens only with the SC-PHP-EXEC sniplets (which I very much like).

  14. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    My development environment is always the latest WordPress version and I don't see this problem with your example from above.

    There must be something else causing this, but I don't know what.

  15. drizzt99
    Member
    Posted 3 years ago #

    da!
    It was cookiemonster!
    Have no idea why it would cause any problems like this one...
    Sorry for the mess, and a lot of thanks for the help!

  16. M66B
    Member
    Plugin Author

    Posted 3 years ago #

    Guilty line of code:
    if (!is_admin()) add_filter('the_content', 'wpautop', 12);
    Seems like this plugin always calls wpautop without opt-out.

  17. drizzt99
    Member
    Posted 3 years ago #

    You're D man!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shortcode Exec PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic