Found URIS broken
-
Hi,
I was checking my page today and found that the Ultimate Responsive Image Slider is broken. My templates have not been updated. I don’t know what broke this. If you could help it would be much appreciated.
All I can see is a black bar, and some images half cut off at the left edge of my website (not supposed to be any content there).
I created a test page for you here (live):
https://sundstedt.se/blog/test-uris-page/
The code I added is simply the URIS tag so that it’s nothing else messing it up:
[URIS id=45156]The page I need help with: [log in to see the link]
-
Hi @sundstedt
I checked the page, slider working great there.
Screenshots:
https://prnt.sc/1ePJdR6Uw3CZ
https://prnt.sc/67cZIzJRBJt0
https://prnt.sc/Ru7LYTsRZfSb
ThanksThanks!
Yes I managed to fix it, by changing some code in the php to display the slider in the same way as the mobile version, since for some reason the mobile versions were still showing the sliders correctly.
I won’t go into details, but clearly some update in WordPress or other plugin may have caused it.
If anyone has the same problem I could post details about how I fixed it.
I had not updated php version so it would not have been that.-
This reply was modified 3 months, 2 weeks ago by
TomPettyFan.
Thanks, Tom, for the Update.
Please rate the plugin and support us: https://ww.wp.xz.cn/support/plugin/ultimate-responsive-image-slider/reviews/
Happy New Year@sundstedt I am having a similar issue. Haven’t changed anything and my sliders are broken. Do you mind sharing your fix? Thanks!
example: https://www.rwcollins.com/projects/excavation-chicago-il-percy-l-julian-hs/ (slider at bottom of page)
Hi @scollins72,
While it’s 10 weeks ago, and I forgot how I fixed it, I had a look and I belive I have found the fix I used. The issue was that the plugin stopped automatically ‘enqueuing’ (loading) its required CSS and JS files, which causes the slider to collapse into a black bar or show cut-off images.
I fixed it by adding this code to my theme’s functions.php file. It manually forces the browser to load the slider’s core files whenever it detects the
[URIS]shortcode on a page:PHP
// Force UR Image Slider JS and CSS to load correctly add_action('wp_enqueue_scripts', function() { global $post; // Check if we are on a single page and if the URIS shortcode exists in the content if (is_singular() && isset($post->post_content) && has_shortcode($post->post_content, 'URIS')) { // Define the plugin's asset path $plugin_base = WP_PLUGIN_URL . '/ultimate-responsive-image-slider/assets'; // Manually load the CSS for the layout wp_enqueue_style('uris-slider-css', $plugin_base . '/css/slider-pro.css', [], null); // Manually load the JS for the sliding functionality wp_enqueue_script('uris-slider-js', $plugin_base . '/js/jquery.sliderPro.js', ['jquery'], null, true); } });Note: If your plugin folder is named differently than
ultimate-responsive-image-slider, you might need to adjust the$plugin_basepath in the code above.
P.S. Always make sure you have a recent backup of the site and database in cPanel before you start editing code on the website, so that you can restore it if you break it.Hope this helps!
-
This reply was modified 4 weeks ago by
TomPettyFan.
@sundstedt thanks so much. Works perfectly!
Guys you doing great job, by helping each other.
Thanks @sundstedt @scollins72
-
This reply was modified 3 months, 2 weeks ago by
You must be logged in to reply to this topic.