WordPress.org

Ready to get started?Download WordPress

Forums

Preserved HTML Editor Markup
[resolved] PHP code snippets not preserved (4 posts)

  1. cwlee_klagroup
    Member
    Posted 2 years ago #

    Original code loaded into HTML editor
    
    <!--  preserved-html-editor-markup TEST 2 -->
    
    <!-- test of PHP code -->
    <?php include("/includes/testimonials/CPSL-testimonial.php"); ?>
    [include file="CPSL-testimonial.php" path="/includes/testimonials"] 
    
    <!-- End preserved-html-editor-markup TEST 2 -->
    
    Code returned by TinyMCE Visual Editor with preserved-html-editor-markup plug-in activated  
    
    <!--  preserved-html-editor-markup TEST 2 -->
    
    <!-- test of PHP code -->
    <!--?php include("/includes/testimonials/CPSL-testimonial.php"); ?-->
    [include file="CPSL-testimonial.php" path="/includes/testimonials"] 
    
    <!-- End preserved-html-editor-markup TEST 2 -->

    RESULT = PHP statement returned commented out

    http://wordpress.org/extend/plugins/preserved-html-editor-markup/

  2. MarcusPope
    Member
    Plugin Author

    Posted 2 years ago #

    Interesting, I tried this multiple times and could not reproduce the behavior. The php code block was preserved as I entered it into the html editor. Can you verify this behavior with just my plugin installed? And what plugin are you using for the [include] shortcode? I'll try my plugin with that if it's a community plugin.

    Thanks,
    Marcus

  3. cwlee_klagroup
    Member
    Posted 2 years ago #

    Hi Marcus,

    The plug-in most likely causing the <?PHP> commenting problem is "Magic-fields" (Version 1.5.8.3). I can't turn off this plug-in as our site functionality is based on its Custom Write Panels. (We built the site back before WordPress supported custom page types when Magic-Fields was the only way to do that.)

    The plug-in we currently use to work around TinyMCE's PHP filter is 'AmberPanther WP Include File'.

  4. cwlee_klagroup
    Member
    Posted 1 year ago #

    Hi Marcus,

    I was able to resolve this issue. The root problem problem is not related to your plug-in and it is not caused by any incompatibility between your plug-in and Magic-Fields.

    The problem was caused by invalid data in my Magic Fields tables. Once I cleaned the tables up, everything worked as it should. Follows is a link that explains the problem and resolution in more detail.

    About halfway down is an entry posted by 'figureone' that starts with... "Ok, so I fixed this problem. In short, it was caused by orphaned field entries in the wp_mf_panel_custom_field table."

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.