GravityKit / GravityView

The best and easiest way to display Gravity Forms entries on your website.
https://www.gravitykit.com/products/gravityview/
245 stars 63 forks source link

BuddyBoss conflict with Gutenberg #2011

Closed rafaehlers closed 6 months ago

rafaehlers commented 6 months ago

When trying to create/publish a new page containing a GravityView View Block, if the plugin BuddyBoss Platform (free to download) a JSON error happens:

image

This comes on top of the JSON return from Gutenberg:

<script type="text/html"id="tmpl-bb-link-preview"><%if(link_scrapping){
    %><%if(link_loading){
        %><span class="bb-url-scrapper-loading bb-ajax-loader"><i class="bb-icon-l bb-icon-spinner animate-spin"></i>Loading preview...</span><%
    }%><%if(link_success||link_error){
        %><a title="Cancel Preview"href="#"id="bb-close-link-suggestion">Remove Preview</a>
        <div class="bb-link-preview-container">

            <% if ( link_images && link_images.length && link_success && ! link_error && '' !== link_image_index ) { %>
                <div id="bb-url-scrapper-img-holder">
                    <div class="bb-link-preview-image">
                        <div class="bb-link-preview-image-cover">
                            <img src="<%= link_images[link_image_index] %>"/></div>
                        <div class="bb-link-preview-icons">
                            <%
                            if ( link_images.length > 1 ) { %>
                                <a data-bp-tooltip-pos="up" data-bp-tooltip="Change image" href="#" class="icon-exchange toolbar-button bp-tooltip" id="icon-exchange"><i class="bb-icon-l bb-icon-exchange"></i></a>
                            <% } %>
                            <% if ( link_images.length ) { %>
                                <a data-bp-tooltip-pos="up" data-bp-tooltip="Remove image" href="#" class="icon-image-slash toolbar-button bp-tooltip" id="bb-link-preview-remove-image"><i class="bb-icon-l bb-icon-image-slash"></i></a>
                            <% } %>
                            <a data-bp-tooltip-pos="up" data-bp-tooltip="Confirm" class="toolbar-button bp-tooltip" href="#" id="bb-link-preview-select-image">
                                <i class="bb-icon-check bb-icon-l"></i></a>
                        </div></div>
                    <% if ( link_images.length > 1 ) { %>
                        <div class="bb-url-thumb-nav">
                            <button type="button" id="bb-url-prevPicButton"><span class="bb-icon-l bb-icon-angle-left"></span></button>
                            <button type="button" id="bb-url-nextPicButton"><span class="bb-icon-l bb-icon-angle-right"></span></button>
                            <div id="bb-url-scrapper-img-count">
                                Image <%= link_image_index + 1 %>&nbsp;of&nbsp;<%= link_images.length %>
                            </div></div>
                    <% } %>
                </div><%
    }%><%if(link_success&&!link_error&&link_url){
        %><div class="bb-link-preview-info"><%var a=document.createElement('a');a.href=link_url;var hostname=a.hostname;var domainName=hostname.replace('www.',
        '');%><%if('undefined'!==typeof link_title&&link_title.trim()&&link_description){
            %><p class="bb-link-preview-link-name"><%=domainName%></p>
                    <% } %>

                    <% if ( link_success && ! link_error ) { %>
                        <p class="bb-link-preview-title"><%= link_title %></p><%
        }%><%if(link_success&&!link_error){
            %><div class="bb-link-preview-excerpt"><p><%=link_description%></p></div><%
        }%></div>
            <% } %>
            <% if ( link_error && ! link_success ) { %>
                <div id="bb-url-error" class="bb-url-error"><%= link_error_msg %></div><%
    }%></div>
    <% } %>
<% } %>
</script>

Looking at BuddyBoss plugin files, I noticed this is a template file located here.

For some reason, that template is pulled when the View block is added to the page.

That can be live tested here: https://debug.try.gravitykit.com/wp-admin/post.php?post=2363&action=edit just update the page.

Tested with GV 2.20.2 and BuddyBoss Platform 2.5.61

floatytheastronaut commented 6 months ago

FreeScout #78195.
https://support.gravitykit.com/conversation/78195?folder_id=1

rafaehlers commented 6 months ago

User notified! ✅