We have installed version of WordPress (3.2.1) and WP e-commerce (3.8.6.1) and I have noticed that in the product editor (within the admin interface) has a lot of gadgets that no longer work and I believe it has to do with a Javascript conflict.
The gadgets that no longer work are:
-
Not all the list of media buttons above the product entry page are visible
-
The only media button that is visible should launch the media browser in a thickbox; however it does not do this, it simply opens the media browser in the same window and is pretty un-usable for non-tech savvy people.
-
The Visual tab button is not selectable at all, only HTML is selectable
-
The “Howdy {user}” message and all the other drop-downs is usually a drop-down menu; but this no longer works.
These bugs do not appear on other pages, and only on the product editor page.
I have attempted to:
-
Comment out every JS file inside /wp-e-commerce/wpsc-admin/admin.php and seeing if it makes any difference
-
Use Firebug to go through and disable each JS file as and where possible to see what effect it has.
However, I am still unable to find where the problem is, or how to fix it.
I am using a clean install of WordPress and the latest download of WP-Ecommerce. The only plugin active is WP-Ecommerce
Any help on this would be great. Thanks.
A picture of the issues are below.
[IMAGE REMOVED FOR SECURITY PURPOSES]
Update: 23 Sep @ 13:15 BST
The admin.js file I refer to is in:
/wpsc-admin/js/admin.js
In the admin.js file, Chrome’s Developer Tools are complaining of an error:
jQuery("a.thickbox").livequery(function(){
tb_init(this);
admin.js:458 Uncaught ReferenceError: tb_init is not defined
});
Also, it reports these errors:
post-new.php:997 Uncaught ReferenceError: switchEditors is not defined
post-new.php:998 Uncaught ReferenceError: switchEditors is not defined
I also believe the /wpsc-admin/includes/display-item-functions.php file has something to do with the bug/issue.
If I comment out the following all the Javascript suddenly works.
function wpsc_filter_delete_text( $translation, $text, $domain ) {
// If I comment this out the JS works.
// If left uncommented the JS does not work
/*
if ( 'Delete' == $text && isset( $_REQUEST['post_id'] ) && isset( $_REQUEST["parent_page"] ) ) {
$translations = &get_translations_for_domain( $domain );
return $translations->translate( 'Trash' ) ;
}
return $translation;
*/
}
I am going to continue my investigation to see where the problem is.
I believe I have resolved the problem.
Whilst the above solution does work, it creates a problem where other gadgets like the variations will not work anymore as intended.
After a lot of trial and error and pulling of hair, I upgraded to the latest version (3-8-7-rc1) and tried again, this does work but isn’t ideal for all instances/occasions.
Apparantly, according to the forum thread I created on the Getshopped website, it is a memory allocation issue. If you view the source of the Edit Product page, you’ll see that it’s suddenly cut off when outputting the ‘Product Download’ metabox.
Anyway, upgrading seems to have solved the problem for now.
Thanks.