• Resolved wpweaver

    (@wpweaver)


    This plugin seems to fail on a Multisite site – it does work on a single site.
    It may be a super-admin capability vs a sub-site admin capability.

    The original code that works is (with api code removed):

    <!-- wp:webfactory/map {"height":390,"address":"denver, co"} -->
    <div class="wp-block-webfactory-map"><div class="wp-block-webfactory-map"><iframe width="100%" height="390px" src="https://www.google.com/maps/embed/v1/place?q=denver%2C%20co&maptype=roadmap&zoom=10&key=apikey...." frameborder="0"></iframe></div></div>
    <!-- /wp:webfactory/map -->

    which gets changed to the following upon leaving the editor and viewing the post:

    <!-- wp:webfactory/map {"height":390,"address":"denver, co"} -->
    <div class="wp-block-webfactory-map"><div class="wp-block-webfactory-map"></div></div>
    <!-- /wp:webfactory/map -->

    This is when logged in as a sub-site admin. If I instead login as the super-admin, then it works as expected.

    I think perhaps sub-site admins can’t insert <iframe>s into a post, in which case there is no workaround other than a warning message for sub-site admins.

    Edit: yep, from the docs: Note: In WordPress Multisite, only Super Admins have the unfiltered_html capability.

    • This topic was modified 6 years, 1 month ago by wpweaver.
    • This topic was modified 6 years, 1 month ago by wpweaver.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WebFactory

    (@webfactory)

    Hi,
    Don’t think this will be an easy fix ?? WP intentionally disallows adding the unfiltered_html capability to any non-Super Admin users on the WP multisite network. So we’d have to alter the needed cap for unfiltered HTML and that doesn’t sound like something users would appreciate.

    Don’t have an answer at the moment. Have to dig into this a bit more.

    Plugin Author WebFactory

    (@webfactory)

    Just to clarify – this is caused by <iframe> that we need to insert the map. We should switch to full JS API to avoid this, but it’s far from a 5min job.

    Thread Starter wpweaver

    (@wpweaver)

    Not sure a switch to JS would work as <script> is not allowed, either.

    It may not really be fixable, but at least you could emit a warning when used on Multisite. Mostly, it was just mysterious what happened on my Multisite until I noticed the superadmin account worked just fine, and then remembered the unfiltered_html capability.

    Plugin Author WebFactory

    (@webfactory)

    Yes, adding a notification seems like the only reasonable “fix” at the moment ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite failure’ is closed to new replies.