• Resolved spatwa110

    (@spatwa110)


    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]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author thehowarde

    (@thehowarde)

    Hi.

    Do you have a mobile image specified?

    Thread Starter spatwa110

    (@spatwa110)

    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.

    Thread Starter spatwa110

    (@spatwa110)

    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.

    Plugin Author thehowarde

    (@thehowarde)

    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 5 years, 9 months ago by thehowarde.
    Thread Starter spatwa110

    (@spatwa110)

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

    Plugin Author thehowarde

    (@thehowarde)

    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()

    Thread Starter spatwa110

    (@spatwa110)

    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.

    Plugin Author thehowarde

    (@thehowarde)

    Try using just “StarParallax2.jpg”

    Thread Starter spatwa110

    (@spatwa110)

    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

    Plugin Author thehowarde

    (@thehowarde)

    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 ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error while viewing on Mobile Devices’ is closed to new replies.