Conflict with this plug in and my edit option
-
Hi there – since the update I have had a problem with my site and after deactivating all plug ins have discovered the issue is caused by this one.
When I make a new post everything works fine but if I save that post as a draft to finish it another time, that’s when I have issues.
I click “add media” and nothing happens. I can’t add any media or replace existing images.
When I click “text” (the option to edit via text instead of visual, again nothing happens.
Everything works fine on a new post but not on an existing draft or existing post.
Suggestions?
Thanks
-
Just wanted to chime in that I too noticed this problem. Oddly enough – it only affected one of my restricted user roles and only occurred on pages, not posts. (Despite that user role having all edit page / media capabilities.)
Clicking “add media” would result in nothing happening. Once I disabled the plugin, everything worked fine again.
Thanks for your inputs – for me this is happening on both pages and posts and yes, if I disable the plug in it’s fine but I like the plug in and it helps decrease load times since I am graphic intense.
I don’t know of another plug in similar so am hoping they can suggest a fix.*cheers*
– I also forgot to add my site link in my previous post
https://ljsecretaddiction.comHey there guys,
Hope you’re well today!
I’ve been testing this on my end and everything is working fine. I’m able to add media to both posts and pages and both new and drafts.
Did you also try testing for a theme conflict? Try switching to one of the default WP themes to see if that will change anything.
If that does’t help could you please check the JavaScript console for errors?
In Chrome go to “View -> Developer -> JavaScript Console” and in Firefox you can go to “Tools -> Web Developer -> Console”
Find information about how to open JavaScript browser console :
https://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers
https://codex.www.ads-software.com/Using_Your_Browser_to_Diagnose_JavaScript_ErrorsLet me know what JavaScript errors if any you are getting when clicking on add media button.
Best regards,
BojanHi Bojan – here’s what I’m getting:
Uncaught TypeError: Cannot read property 'hasClass' of undefined load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-respons…:256
here’s what that line looks like:
!function(a){function b(){var b,d=a("#wp-auth-check"),f=a("#wp-auth-check-form"),g=e.find(".wp-auth-fallback-expired"),h=!1;f.length&&(a(window).on("beforeunload.wp-auth-check",function(a){a.originalEvent.returnValue=window.authcheckL10n.beforeunload}),b=a('<iframe id="wp-auth-check-frame" frameborder="0">').attr("title",g.text()),b.load(function(){var b,i;h=!0;try{i=a(this).contents().find("body"),b=i.height()}catch(j){return e.addClass("fallback"),d.css("max-height",""),f.remove(),void g.focus()}b?i&&i.hasClass("interim-login-success")?c():d.css("max-height",b+40+"px"):i&&i.length||(e.addClass("fallback"),d.css("max-height",""),f.remove(),g.focus())}).attr("src",f.data("src")),a("#wp-auth-check-form").append(b)),e.removeClass("hidden"),b?(b.focus(),setTimeout(function(){h||(e.addClass("fallback"),f.remove(),g.focus())},1e4)):g.focus()}function c(){a(window).off("beforeunload.wp-auth-check"),"undefined"==typeof adminpage||"post-php"!==adminpage&&"post-new-php"!==adminpage||"undefined"==typeof wp||!wp.heartbeat||wp.heartbeat.connectNow(),e.fadeOut(200,function(){e.addClass("hidden").css("display",""),a("#wp-auth-check-frame").remove()})}function d(){var a=parseInt(window.authcheckL10n.interval,10)||180;f=(new Date).getTime()+1e3*a}var e,f;a(document).on("heartbeat-tick.wp-auth-check",function(a,f){"wp-auth-check"in f&&(d(),!f["wp-auth-check"]&&e.hasClass("hidden")?b():f["wp-auth-check"]&&!e.hasClass("hidden")&&c())}).on("heartbeat-send.wp-auth-check",function(a,b){(new Date).getTime()>f&&(b["wp-auth-check"]=!0)}).ready(function(){d(),e=a("#wp-auth-check-wrap"),e.find(".wp-auth-check-close").on("click",function(){c()})})}(jQuery);
Also, I switched to the Twenty Fifteen theme and the error did go away. I’m going to try to narrow down the cause in my theme. It’s odd that deactivating WP Smush fixes the issue.
Hello,
I have exactly same problem with one of my CPTs. I’ve enabled SCRIPTS_DEBUG and on page load, I get those errors:Uncaught TypeError: Cannot read property 'id' of undefined media-audiovideo.js?ver=4.2.1:86
Uncaught TypeError: Cannot read property 'id' of undefined media-models.js?ver=4.2.1:1229
Then on click on “Add Media” I got this:
Uncaught TypeError: Cannot read property 'audio' of undefined media-views.js?ver=4.2.1:5089
Hope that helps, Jakub
Hey there guys,
Thank you for additional information. This is definitely a conflict between WP Smush and theme that you’re using.
Would you mind letting us know which theme is that so we can try to recreate this?
Best regards,
BojanMy theme is a modified version of the Underscores theme. I generated a fresh theme on their website and tested it and encountered the same issue with the Add Media button not working on pages for users with the Editor role.
I was able to replicate the error on my localhost by doing the following:
– Create fresh install of 4.2.1
– Upload / Activate newly generated version of Underscores theme
– Create a user with the Editor Role
– Install WP Smush
– Log in as editor, edit a page, and try to Add MediaHey again yellowhousedesign.
Thank you so much for this detailed explanation and steps to reproduce the issue, you’re awesome!
With that being said I’ve managed to recreate the issue on my end as well so I can confirm that there is a conflict between WP Smush and Underscores themes.
I’ll notify our plugin developer so he can take a look.
Best regards,
BojanI actually don’t use Underscores or anything like that. I have from scratch custom made theme, but i believe, that problem would be in some js library I’m using. I have theme here: https://github.com/jakub-klapka/linnette_2015-wp (frontend here: https://github.com/jakub-klapka/linnette_2015-html ), but we might wait, if you fix the problem with underscores and I let you know, if that fixes it for me too.
If not, or if you want more information about that, I can give you access to my staging web with this template, so you don’t have to dig into my github repo.Hey there Jakub Klapka,
It’s most likely the same issue so we can wait for the fix from our developers and see if that will help ??
Best regards,
BojanHi everyone,
Just for information, I’ve got exactly the same issue since the 4.2.1 upgrade and with a custom theme. I’m also waiting for the fix ??
Br,
FrédéricHey there Frédéric,
Thanks for reporting this as well. Our developer is looking in the issue. I’ll keep you guys posted ??
Best regards,
BojanI have run into a very similar problem that might be linked. I also found a way to fix it, but it is not the ideal circumstance. Loading WP Smush causes my posts (not pages) text editor to load without any of the buttons (bold, italic, link, etc). Some of my content editors use this and reported this to me. If I disable WP Smush the problem disappears. I am running a modified html5 blank theme, so it is basically custom. This problem can be fixed for me, by going into wp-config and setting this:
define(‘CONCATENATE_SCRIPTS’, false);
This problem does not present if you add a new post, however if you go into a published or draft post, the toolbar does not load. There is a script conflict occurring and it is stopping the rest of the scripts from loading (including the toolbar).
Other Misc Info:
Plugins – ACF Pro, Media Replace, Redirection, Ajax Load More, Advanced Access Manager, Yoast SEO, Scripts N StylesIf you need any other information let me know, thanks!
Here is the copy of the error:
TypeError: wp.media.view.settings.post is undefined
https://my-ip/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,heartbeat,autosave,suggest,wp-ajax-response,jquery-color,wp-lists,postbox,tags-box,post,editor-expa&load%5B%5D=nd,svg-painter,wp-auth-check,jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete,jquery-ui-accordion,editor,media-editor,me&load%5B%5D=dia-audiovideo,wp-playlist,mce-view,imgareaselect,image-edit,word-count,quicktags,wplink&ver=4.2.1
Line 304Hey there jhodak,
Thanks for posting here and offering a solution for your problem, it will definitely be useful to our developer.
Have a great day!
Cheers,
BojanI’m having the same problem as the original poster. My theme is Thesis 1.8.5. I know it’s probably compatible with newer versions of Thesis, but I don’t like the newer versions of Thesis. So I’m hoping there’s a fix I can employ. Thanks!
- The topic ‘Conflict with this plug in and my edit option’ is closed to new replies.