Title: conflict javascript
Last modified: August 21, 2016

---

# conflict javascript

 *  [wordpress Spec](https://wordpress.org/support/users/powerflash/)
 * (@powerflash)
 * [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/)
 * I use qtranslate and today updated wp to 3.9.1 but now in tinymce editor I have
   a conflict and error when I switch between code and visual view.
 * this is the error on chrome:
 * Uncaught TypeError: Cannot read property ‘documentBaseURL’ of undefined
    in tinymce.
   min.js?ver=4021-20140423:8
 * I commented qtrans_initJS() and work fine, I think that the problem in in qtranslate_javascript.
   php
 * [https://wordpress.org/plugins/qtranslate/](https://wordpress.org/plugins/qtranslate/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [boesh](https://wordpress.org/support/users/boesh/)
 * (@boesh)
 * [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/#post-4917602)
 * What version of qTranslate are u using….
    Look here: [http://www.qianqin.de/qtranslate/download/](http://www.qianqin.de/qtranslate/download/)
 * There is no working version of qTranslate for 3.9.1.
 *  Thread Starter [wordpress Spec](https://wordpress.org/support/users/powerflash/)
 * (@powerflash)
 * [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/#post-4917603)
 * should I go back to 3.8.1 ?
 *  Thread Starter [wordpress Spec](https://wordpress.org/support/users/powerflash/)
 * (@powerflash)
 * [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/#post-4917629)
 * I solved with these files modification:
 * [https://gist.githubusercontent.com/warenhaus/10990386/raw/b8b850a908d78dc81e23656595042a7afb4dc4cc/qtranslate_javascript.php](https://gist.githubusercontent.com/warenhaus/10990386/raw/b8b850a908d78dc81e23656595042a7afb4dc4cc/qtranslate_javascript.php)
 * [https://gist.githubusercontent.com/warenhaus/10990386/raw/875b58fb1137f0e8b759713bc0a8aad87ea77b23/qtranslate_hooks.php](https://gist.githubusercontent.com/warenhaus/10990386/raw/875b58fb1137f0e8b759713bc0a8aad87ea77b23/qtranslate_hooks.php)
 * [https://gist.githubusercontent.com/warenhaus/10990386/raw/4f26d5f08eee33e72010fdebfe7a45398b8dc729/qtranslage_wphacks.php](https://gist.githubusercontent.com/warenhaus/10990386/raw/4f26d5f08eee33e72010fdebfe7a45398b8dc729/qtranslage_wphacks.php)
 *  [leoloso](https://wordpress.org/support/users/leoloso/)
 * (@leoloso)
 * [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/#post-4917682)
 * Hi powerflash, thanks for your hack, but now it breaks things when qTranslate
   is not enabled:
 * I have enabled it only for Pages, disabled it for posts with the following code:
 *     ```
       add_action('admin_head', 'gd_qtrans_disable', 1);
       function gd_qtrans_disable()
       {
           global $pagenow;
   
           if (in_array($pagenow, array('post-new.php', 'post.php'))) {
   
           	$qtrans_disable = apply_filters('qtrans_disable', false);
   
           	if ($qtrans_disable) {
   
       			remove_action('admin_head', 'qtrans_adminHeader');
       			remove_filter('admin_footer', 'qtrans_modifyExcerpt');
       			remove_filter('the_editor', 'qtrans_modifyRichEditor');
       		}
           }
       }
   
       add_filter('qtrans_disable', 'qtrans_disable_post');
       function qtrans_disable_post($disable) {
   
       	if (get_post_type() == 'post')
       		return true;
   
       	return $disable;
       }
       ```
   
 * Is there any way around it, so it doesn’t break this?
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘conflict javascript’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate.svg)
 * [qTranslate](https://wordpress.org/plugins/qtranslate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [leoloso](https://wordpress.org/support/users/leoloso/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/qtranslate-conflict-javascript/#post-4917682)
 * Status: not resolved