BuddyDev

Search

mediapress error occasional 404s? enque only on bp pages?

  • Participant
    Level: Initiated
    Posts: 5
    djSteve on #38019

    I think I’ve run into sporatic errors that involve mediapress – wondering how to send you more code perhaps non public?
    Also wondering if we can only enque the mediapress stuff on BP pages to avoid this issue? I guess some stuff is needed for the admin bar though – hmm..

    anyone I get sporadic 404s and the debugger shows some stuff including this:

    <ul style="display: none;"><li id="mpp-loader-wrapper" style="display:none;" class="mpp-loader"><div id="mpp-loader"><img
     src="https://cdn.mywebsite.com/wp-content/plugins/mediapress/templates/mediapress/default/assets/images/loader.gif"/></div></li></ul><div id="mpp-cover-uploading" style="display:none;" class="mpp-cover-uploading"> <img src="https://cdn.mywebsite.com/wp-content/plugins/mediapress/templates/mediapress/default/assets/images/loader.gif"/></div><div id="swcfpc-ajax-nonce" style="display:none;">04e72dd071</div><div class="bptk-report-modal bptk-report-closed" id="bptk-report-modal"><div class="bptk-report-modal-inner" id="bptk-report-modal-inner"><div class="bptk-report-modal-inner-header"><h4>New Report</h4><h4 class="bptk-report-close-button" id="bptk-report-close-button">Close</h4></div> <input type="hidden" id="bptk-reported-id" value=""> <input type="hidden" id="bptk-reporter-id" value="1"> <input type="hidden" id="bptk-activity-type"> <input type="hidden" id="bptk-item-id"> <input type="hidden" id="bptk-link"> <input type="hidden" id="bptk-meta"> <select  name='bptk-report-type' id='bptk-report-type' class='postform' ><option value='-1'>What type of report is this?</option><option class="level-0" value="132">Misleading or scam</option><option class="level-0" value="131">Offensive</option><option class="level-0" value="130">Spam</option><option class="level-0" value="133">Violent or abusive</option> </select><textarea rows="5"
                              placeholder="Please give as much detail as possible"
                              name="bptk-desc" id="bptk-desc"></textarea><button class="button" id="bptk-report-submit" name="submit"
     data-nonce="c4d79c5396">Send</button><p id="bptk-report-modal-response"></p></div></div><div class="bptk-report-modal-overlay bptk-report-closed" id="bptk-report-modal-overlay"></div> <script type='text/javascript' src='https://cdn.mywebsite.com/wp-includes/js/admin-bar.min.js?ver=5.7.1' id='admin-bar-js'></script> <script type='text/javascript' id='wp-polyfill-js-after'>( 'fetch' in window ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-url.min.js?ver=3.6.4"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2"></scr' + 'ipt>' );( 'objectFit' in document.documentElement.style ) || document.write( '<script src="https://cdn.mywebsite.com/wp-includes/js/dist/vendor/wp-polyfill-object-fit.min.js?ver=2.3.4"></scr' + 'ipt>' );</script> <script type='text/javascript' id='wp-api-fetch-js-after'>wp.apiFetch.use( wp.apiFetch.createRootURLMiddleware( "https://mywebsite.com/wp-json/" ) );
    wp.apiFetch.nonceMiddleware = wp.apiFetch.createNonceMiddleware( "e6bd267e1f" );

    I’ve tried switching to different caching plugsin and such – but still keep getting these 404s sometimes – it’s weird.

    firefox debugger console suggests this line is the issues with “ReferenceError: “x” is not defined”

    I think.. generally reloading page pulls the regular page fine – it’s so weird that it’s not ever time.

    any ideas?

    Steve

  • Participant
    Level: Initiated
    Posts: 5
    djSteve on #38049

    sorry, this appears to be more of an auto-optimize thing rather than specifically mediapress. I thought I understood the error – but it appears after more research that it’s most likely caused by the optimize / javascript defer scripts I’ve been using to increase page load speed / core vitals.

    Which is affecting mediapress perhaps? and I should find which parts of mediapress to add to the “exclusions list” – so that it can function as needed. (is there one javascript needed to not be deferred? more than one resource that needs to load and not be deferred until after page is loaded/rendered?

    Seems to be a recurring issue when using autooptimize or wp-rocket and likely other similar ones.

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #38128

    Hi,
    Thank you for notifying the issue with the optimization plugins.

    Please exclude the mediapress/assets/js folder and let me know if that works. We will be looking at adding better compat when we restart the development for MediaPress.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved