WPIntell

Source evidence

Error while viewing on Mobile Devices

Parallax Image · support · 2019-06-04T16:20:00+00:00

mixedsentiment
mediumseverity
0.85relevance
10replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 15 rows with source links

6.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

14 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
spatwa110 resolved
Error while viewing on Mobile Devices. Here is the error: “Warning: Division by zero in /wp-content/plugins/parallax-image/assets/shortcode.php on line 101” How do i fix this? This is very urgent. The page I need help with: [ log in to see the link] Hi. Do you have a mobile image specified? Yes however it is the same image that i have for large devices. I am using the same images assigned to both. Funny thing is it is working on my test environment and as soon as i moved it to live server it is now giving me this error on mobile devices only. While viewing it on desktop i get no errors. I tested everything on my side and that is deactivating all the plugins to see if there are any conflicts. I also tried downgrading the wordpress version to see if that was causing an issue but no luck. My guess is it is something to do with your plugin. Thank you. The only reason it would get a divide by zero error here is because it can’t find the mobile image. Try re-uploading the mobile image separately and specify it in the shortcode settings. Or leave out the mobile image if you’re not using it. This reply was modified 6 years, 12 months ago by thehowarde . i tried uploading the image and assigned it to the shortcode but no luck. I am still getting the error. I would need more details to troubleshoot your issue. What is the shortcode you are using – include it here? How have you specified everything in the shortcode, and on the site? What type of image is in use? The divide by zero error is because your image is failing to return a number for the php function getimagesize. PHP getimagesize() Here is the shortcode: [dd-parallax img=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg” height=”500″ speed=”5″ z-index=”1″ position=”center” offset=”true” mobile=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg”][/dd-parallax] It is a jpeg and it is pointing directly to media folder through a direct URL. Try using just “StarParallax2.jpg” Man you are genius!!. That worked however, i am curious why would something like that cause an issue? I mean i had the whole image path assigned. Thank you. Another issue is the mobile image losses its parallax effect on mobile devices. Now, i sort of know this doesn’t work very well on mobile devices but is there any way you can make it possible using JavaScript or jquery. Look at this example: https://www.jqueryscript.net/demo/Responsive-Performant-Background-Parallax-Effect-Parallax-Background/ Download: https://www.jqueryscript.net/animation/Responsive-Performant-Background-Parallax-Effect-Parallax-Background.html This parallax effect doesn’t work on mobile. I am using a different parallax effect than the one you reference. Glad your issue is fixed though. Thanks 🙂

Comments

10 shown
thehowarde 2019-06-04T16:32:00+00:00

Hi. Do you have a mobile image specified?

spatwa110 2019-06-04T16:37:00+00:00

Yes however it is the same image that i have for large devices. I am using the same images assigned to both. Funny thing is it is working on my test environment and as soon as i moved it to live server it is now giving me this error on mobile devices only. While viewing it on desktop i get no errors.

spatwa110 2019-06-04T16:55:00+00:00

I tested everything on my side and that is deactivating all the plugins to see if there are any conflicts. I also tried downgrading the wordpress version to see if that was causing an issue but no luck. My guess is it is something to do with your plugin. Thank you.

thehowarde 2019-06-04T16:59:00+00:00

The only reason it would get a divide by zero error here is because it can’t find the mobile image. Try re-uploading the mobile image separately and specify it in the shortcode settings. Or leave out the mobile image if you’re not using it. This reply was modified 6 years, 12 months ago by thehowarde .

spatwa110 2019-06-04T17:26:00+00:00

i tried uploading the image and assigned it to the shortcode but no luck. I am still getting the error.

thehowarde 2019-06-04T17:34:00+00:00

I would need more details to troubleshoot your issue. What is the shortcode you are using – include it here? How have you specified everything in the shortcode, and on the site? What type of image is in use? The divide by zero error is because your image is failing to return a number for the php function getimagesize. PHP getimagesize()

spatwa110 2019-06-04T17:41:00+00:00

Here is the shortcode: [dd-parallax img=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg” height=”500″ speed=”5″ z-index=”1″ position=”center” offset=”true” mobile=”WEBADDRESS/wp-content/uploads/2019/05/StarParallax2.jpg”][/dd-parallax] It is a jpeg and it is pointing directly to media folder through a direct URL.

thehowarde 2019-06-04T17:43:00+00:00

Try using just “StarParallax2.jpg”

spatwa110 2019-06-04T18:57:00+00:00

Man you are genius!!. That worked however, i am curious why would something like that cause an issue? I mean i had the whole image path assigned. Thank you. Another issue is the mobile image losses its parallax effect on mobile devices. Now, i sort of know this doesn’t work very well on mobile devices but is there any way you can make it possible using JavaScript or jquery. Look at this example: https://www.jqueryscript.net/demo/Responsive-Performant-Background-Parallax-Effect-Parallax-Background/ Download: https://www.jqueryscript.net/animation/Responsive-Performant-Background-Parallax-Effect-Parallax-Background.html

thehowarde 2019-06-04T19:14:00+00:00

This parallax effect doesn’t work on mobile. I am using a different parallax effect than the one you reference. Glad your issue is fixed though. Thanks 🙂