WordPress.org

Ready to get started?Download WordPress

Forums

Youtube shortcode
It screwed up my Dashboard (30 posts)

  1. lemonjenny
    Member
    Posted 2 years ago #

    I don't know how or why, but as soon as I installed this plugin I couldn't see any of the text or options on my posts page. As soon as I deactivated/deleted it, everything worked fine again.

    http://wordpress.org/extend/plugins/youtube-shortcode/

  2. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, lemonjenny,

    What version of wordpress are you using?
    Did you have any other Youtube plugin installed when you tested mine?

    Without any more details, all I can tell you is to try the following solutions in the order specified after you've activated the Youtube shortcode plugin:
    1. Disable any other Youtube plugin and any plugin that modifies the rich text editor (post editor) and test again.
    2. Clear your browser's cache and test again.
    3. Deactivate my plugin and activate it again.

    I'm here to help ;)

  3. BilliardGreg
    Member
    Posted 2 years ago #

    I am running the latest version of wordpress, no other youtube plugin installed. all updates are made. I disabled all plugins and systematically enabled all plugins and when i came back to yours i am having the same issue where visual mode is not working. I have ran into this before with a plugin where it initializes jquery a second time after it has already been enabled. I have not found where to edit this plugin to get the visual mode to work. any help would be appreciated.
    Thanks.

  4. BilliardGreg
    Member
    Posted 2 years ago #

    So there where two differences in the pages, The first one was on this line. first one is one without the plugin enabled and the second one is one with your plugin enabled.

    },relative_urls:false,remove_script_host:false,convert_urls:false,remove_linebreaks:true,gecko_spellcheck:"false",keep_styles:false,entities:"38,amp,60,lt,62,gt",accessibility_focus:true,tabfocus_elements:"major-publishing-actions",media_strict:false,paste_remove_styles:true,paste_remove_spans:true,paste_strip_class_attributes:"all",paste_text_use_dialog:true,extended_valid_elements:"article[*],aside[*],audio[*],canvas[*],command[*],datalist[*],details[*],embed[*],figcaption[*],figure[*],footer[*],header[*],hgroup[*],keygen[*],mark[*],meter[*],nav[*],output[*],progress[*],section[*],source[*],summary,time[*],video[*],wbr",wpeditimage_disable_captions:false,wp_fullscreen_content_css:"http://www.billiardgreg.com/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css",plugins:"inlinepopups,spellchecker,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,-cforms,-AtD,-YoutubeShortcodeMargenn,wpfullscreen",elements:"content",wpautop:true,apply_source_formatting:false,theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,AtD,wp_fullscreen,wp_adv,separator,cforms,|,YoutubeShortcodeButtonMargenn",theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo,wp_help",theme_advanced_buttons3:"",theme_advanced_buttons4:"",atd_rpc_url:"http://www.billiardgreg.com/wp-admin/admin-ajax.php?action=proxy_atd&url=",atd_ignore_rpc_url:"http://www.billiardgreg.com/wp-admin/admin-ajax.php?action=atd_ignore&phrase=",atd_rpc_id:"WPORG-321af3fadcc90d7bf470a30f053ab102",atd_theme:"wordpress",atd_ignore_enable:"true",atd_strip_on_get:"true",atd_ignore_strings:"",atd_show_types:""}},

    },relative_urls:false,remove_script_host:false,convert_urls:false,remove_linebreaks:true,gecko_spellcheck:"false",keep_styles:false,entities:"38,amp,60,lt,62,gt",accessibility_focus:true,tabfocus_elements:"major-publishing-actions",media_strict:false,paste_remove_styles:true,paste_remove_spans:true,paste_strip_class_attributes:"all",paste_text_use_dialog:true,extended_valid_elements:"article[*],aside[*],audio[*],canvas[*],command[*],datalist[*],details[*],embed[*],figcaption[*],figure[*],footer[*],header[*],hgroup[*],keygen[*],mark[*],meter[*],nav[*],output[*],progress[*],section[*],source[*],summary,time[*],video[*],wbr",wpeditimage_disable_captions:false,wp_fullscreen_content_css:"http://www.billiardgreg.com/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css",plugins:"inlinepopups,spellchecker,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,-cforms,-AtD,wpfullscreen",elements:"content",wpautop:true,apply_source_formatting:false,theme_advanced_buttons1:"bold,italic,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,wp_more,|,AtD,wp_fullscreen,wp_adv,separator,cforms",theme_advanced_buttons2:"formatselect,underline,justifyfull,forecolor,|,pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo,wp_help",theme_advanced_buttons3:"",theme_advanced_buttons4:"",atd_rpc_url:"http://www.billiardgreg.com/wp-admin/admin-ajax.php?action=proxy_atd&url=",atd_ignore_rpc_url:"http://www.billiardgreg.com/wp-admin/admin-ajax.php?action=atd_ignore&phrase=",atd_rpc_id:"WPORG-321af3fadcc90d7bf470a30f053ab102",atd_theme:"wordpress",atd_ignore_enable:"true",atd_strip_on_get:"true",atd_ignore_strings:"",atd_show_types:""}},

    The only other thing I noticed is that when your plugin is disabled it shows 3 cforms sections and with your plugin enabled it only shows 2 a little but later on. But I am not sure where the issue is cause with your plugin enabled and cforms disabled it still does not allow me to see the visual editor.

  5. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Hi BilliardGreg,

    I'll look into this.

    As soon as I can explain this odd behavior I'll post my findings here.

  6. BilliardGreg
    Member
    Posted 2 years ago #

    err the lines of code might be reversed, so much code to look at, lol

  7. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Please make a quick test:

    - Enable debug mode in wp-config.php
    - Disable all plugins except Youtube shortcode and check the visual editor.

    Any PHP errors/notices, visual editor still corrupted?

    Please clear your browser cache before testing.

    Report!

  8. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    I've installed the Cforms plugin (latest version) in the docs site (wp 3.3.1 with Youtube shortcode 1.8.3 installed).

    Cforms is a buggy plugin IMO, you should avoid it because there're better alternatives such as Contact Form 7.

    To the topic:

    Once installed the visual editor loads fine, but if you insert a cform in the editor, all stops working because the cforms plugin throws an error :S

    I don't know what version of cforms you're using but my best advice is to avoid it.

    Are you using any other plugin that adds a button to the visual editor?

  9. BilliardGreg
    Member
    Posted 2 years ago #

    Enabled Debug Mode, Disabled all plugins except for shortcode plugin and visual editor is still disabled. no php errors or notices with debug mode on. and made sure cached was cleared in browser.

  10. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Nice!

    Could you paste the browser console log? Maybe a Javascript error has been thrown. That would help me a lot.

  11. BilliardGreg
    Member
    Posted 2 years ago #

    Not sure where to find the log files you are looking for. Tried in two other browsers. Visual editor works in ie but not in firefox or chrome. and i have ie showing javascript errors and none where thrown.

  12. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Easy, in Chrome: right click -> Inspect element -> Console tab

  13. BilliardGreg
    Member
    Posted 2 years ago #

  14. BilliardGreg
    Member
    Posted 2 years ago #

    now we are getting somewhere

  15. BilliardGreg
    Member
    Posted 2 years ago #

    i know its not a solution to the prob but i changed the code here

    // Register our TinyMCE Script
    	function add_tinymce_button_script($plugin_array) {
    		//$plugin_array['YoutubeShortcodeMargenn'] = plugins_url('tinymcebutton.js.php?params='.$this->get_pop_up_params(), __FILE__);
    		//return $plugin_array;
    return false;
    	}

    which allowed the visual editor to start working again in all browsers. although there are no extra buttons anywhere on the tinymce editor for even other plugins so there has to be something going on with the new wordpress update.

  16. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    No, if you want to disable the Youtube button modify your snippet like this:

    // Register our TinyMCE Script
    function add_tinymce_button_script($plugin_array) {
    	//$plugin_array['YoutubeShortcodeMargenn'] = plugins_url('tinymcebutton.js.php?params='.$this->get_pop_up_params(), __FILE__);
    	return $plugin_array;
    }
  17. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    I keep researching but I think I've already found the issue.

  18. BilliardGreg
    Member
    Posted 2 years ago #

    kewl glad to be of help. when you do find the solution please let me know, i am guessing its as easy as uploading a file or changing a path location.

  19. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Umm...it's not going to be that easy I'm afraid.
    I must test and change quite a few things to avoid that 404 error under every possible scenario.
    I'll let you know!

  20. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    One last favor: Could you paste the contents of your .htaccess file?

  21. BilliardGreg
    Member
    Posted 2 years ago #

    # mod_rewrite in use
    RewriteEngine On
    Options +FollowSymLinks

    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]

    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  22. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Make this test (I promise this is the last thing I'll request you to do):

    1) Make a backup of the .htaccess content
    2) Remove this code from it & save the file:

    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]
    
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml

    3) Restore the plugin mod we did earlier so it looks like this:

    // Register our TinyMCE Script
    function add_tinymce_button_script($plugin_array) {
    	$plugin_array['YoutubeShortcodeMargenn'] = plugins_url('tinymcebutton.js.php?params='.$this->get_pop_up_params(), __FILE__);
    	return $plugin_array;
    }

    4) Test again the visual editor

    If I'm right the Youtube button should appear.

  23. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Note that you must clear the browser cache every time you want to test this.

  24. BilliardGreg
    Member
    Posted 2 years ago #

  25. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    OK, thank you!!

    I'm modifying the plugin.

    I'll let you know when it's done. However, I'd like you to test it before release so how should I send you the modified plugin?

  26. BilliardGreg
    Member
    Posted 2 years ago #

    I will gladly test it for you. As soon as I see the email with modifications I will do it and get back to you so you can release it asap. Glad I can be of some assistance.

  27. BilliardGreg
    Member
    Posted 2 years ago #

    Sorry didnt notice how you where asking to send it to me, I have added a file upload piece to my contact form, if you would like you can use that.

  28. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Email sent!

  29. BilliardGreg
    Member
    Posted 2 years ago #

    Deactivated Plugin, Uploaded new files and overwrote ones that already existed, re-activated plugin, edited a post in visual mode. Able to see everything including the youtube button now. Looks like the modifications where a success.

  30. Tubal
    Member
    Plugin Author

    Posted 2 years ago #

    Great! Thanks for your patience!

    I will send you another version, probably tomorrow, to test some improvements in your "hostile environment" ;)

    Thanks again,
    Tubal

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic