WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP MU Removing HTML code on non Super-Admin roles (5 posts)

  1. johnnyflash
    Member
    Posted 1 year ago #

    Hi, I'm running WP MU 3.5.1 on two different sites and experiencing the same problem on both sites. When you're logged in as anything but a Super-Admin and you make changes using the VISUAL or TEXT/HTML tab of a page that already contains HTML, it removes parts of the HTML. It happens even if I only use the TEXT/HTML tab. For example, I have a page that has the code below.

    <!-- BEGIN: Constant Contact Stylish Email Newsletter Form -->
    <form action="http://visitor.r20.constantcontact.com/d.jsp" method="post" name="ccoptin" target="_blank"><span style="margin-bottom: 6;"><strong>Sign up for our Email Newsletter</strong></span>
    <input value="Enter your email address" style="font-family: Verdana,Geneva,Arial,Helvetica,sans-serif; font-size: 12px; padding: 2px; border: 1px solid #999999;" type="text" name="ea" size="35" /> <input class="submit" style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px;" type="submit" name="go" value="GO" />
    <input type="hidden" name="llr" value="konn6aeab" />
    <input type="hidden" name="m" value="1103837443530" />
    <input type="hidden" name="p" value="oi" /></form><!-- END: Constant Contact Stylish Email Newsletter Form -->

    If I'm not logged in as a Super-Admin, and try to change anything on the page or add some non-html only using the TEXT tab and press Update, it will modify the code to the following code below (removing the input fields):

    <!-- BEGIN: Constant Contact Stylish Email Newsletter Form -->
    
    <form action="http://visitor.r20.constantcontact.com/d.jsp" method="post" name="ccoptin" target="_blank"><span style="margin-bottom: 6"><strong>Sign up for our Email Newsletter</strong></span>
    
    </form><!-- END: Constant Contact Stylish Email Newsletter Form -->

    I have tried disabling all of my plugins and changing my theme, and that doesn't resolve the issue. The weird thing is that I am unable to replicate the error on a regular install of WP 3.5.1 (non WP MU). It only seems to happen on the WP MU sites (which are on two different servers).

    Another strange thing, is that if you try to restore an older version of the page that contains the input fields, if you do it as a non super-admin, then it strips out the input fields. If you restore as a super-admin, then they will stay there.

    There are other weird html errors, I'm just using this form/input code as an example.

    I have tried several plugins such as Raw HTML and Preserved HTML Editor Markup, and they had no effect on the problem.

    It almost seems like a permission or database issue. It's just weird that the issue doesn't happen for super-admins.

    Help please :-)

  2. ryansantschi
    Member
    Posted 1 year ago #

    When you are logged-in as non Super-admin, you make changes, save and the input disappears does the input disappear on the actual page?

  3. ryansantschi
    Member
    Posted 1 year ago #

    This is how MU is designed core.trac.wordpress.org/ticket/20085
    Check out this plugin wordpress.org/extend/plugins/unfiltered-mu/

  4. johnnyflash
    Member
    Posted 1 year ago #

    Yes, gone in the editor, gone on the actual page and gone if you leave the page and come back. If you then log in as a super-admin and go to the page it's gone too. The only way to get it back is to then re-add the code as a super-admin and press save or restore from an older version (as a super-admin) where the code was present.

  5. johnnyflash
    Member
    Posted 1 year ago #

    Wow, thanks so much! That did the trick. I don't quite understand why that is designed that way, but glad there is a 2+ year old plugin that seems to solve the issue. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic