Ik kan nu de website niet bekijken omdat er zo’n maintainance plugin actief is. Ik zie nu alleen “Website in opbouw!”
The second option you’re referring to could work, but that was for an older version of the plugin. For the current version:
Search for the next line (line 488)
wp_enqueue_script ( 'lightbox2-js', plugins_url ( 'js/lightbox' . (defined ( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min') . '.js', __FILE__ ), array (
'jquery'
), '2.6', true );
And replace it with:
wp_enqueue_script ( 'lightbox2-js', plugins_url ( 'js/lightbox' . (defined ( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min') . '.js', __FILE__ ), array (
'jquery'
), '2.6', false);
I don’t know if it works, but you can try.
Thread Starter
cuzic
(@cuzic)
I disabled the maintenance plugin, my bad! You speak dutch too? Great to know! 🙂 But I guess we continue in english if someone else ever needs the solution to this problem…
I tried replacing the code but unfortunately it still opens the attachment page & some stuff on the website broke due to the code change 🙁 Anything else you suggest now that you can access the page?
Thanks man!
The problem is still the jQuery version. This plugin requires version > 1.10 and somehow version 1.6.1 is loaded (see the second script tag). This version is also loaded from google’s CDN and not the bundled version that comes with WordPress (version 1.10.*).
So it might be interesting to check which plugin or theme is the cause of loading that jQuery 1.6.1.
<link rel='stylesheet' id='easy_table_style-css' href='http://chirowindeke.be/wp-content/plugins/easy-table/themes/cuscosky/style.css?ver=1.4' type='text/css' media='all' />
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js?ver=1.6.1'></script>
<script type='text/javascript' src='http://chirowindeke.be/wp-content/themes/peekaboo/js/superfish-compile.js?ver=3.8'></script>
Thread Starter
cuzic
(@cuzic)
When I change the theme, the lightbox works… That sucks :/ I’ve been customizing this theme for quite some time. I was going to release the website when the photo albums were done. I guess there is no way to fix this then? Damn, I really liked this plugin!
If you know your theme quite a bit, then look in functions.php or some other php file with functions for some code that adds the old version of jQuery. When you’ve found it, please post it here.
Some help that you know where to look for:
http://www.wpbeginner.com/wp-themes/replace-default-wordpress-jquery-script-with-google-library/
Thread Starter
cuzic
(@cuzic)
function pkb_reg_script() {
if (!is_admin()) {
// comment out the next two lines to load the local copy of jQuery
wp_deregister_script('jquery');
wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js', false, '1.6.1');
I tried commenting it out like it says, but that makes it so that I’m unable to access the webpage (blank page)
Make sure you have a valid php file after commenting those two lines out. A blank page means usually that there is an php error. You can view that when you set define('WP_DEBUG', true); in wp-config.php.