Cannot read property 'replace' of undefined

Home Forums WordPress Tooltips Plugin Support Cannot read property 'replace' of undefined

This topic contains 9 replies, has 2 voices, and was last updated by  Tomas Zhu .

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts

  • gba
    Participant

    Hello!

    Using your plugin I get a JS error:
    Cannot read property ‘replace’ of undefined

    Here is my URL:
    http://dsw.dwpro.at/10/

    Can you help, please?

    Kind regards,
    Gerald


    Tomas Zhu
    Keymaster

    Hi Gerald,

    Thanks for the message. ๐Ÿ™‚

    About “Cannot read property โ€˜replaceโ€™ of undefined”

    In general, this means you have a js code line which using “replace” method, I think this is not codes of my plugin, I guess maybe your theme or another plugin use this javascript replace method, and caused this problem, my suggestion is:
    1: Full backup your site, include folders and database, please note, before you do anything, full backup your site, so your site and your users is always in zero risk, no matter what happen.

    2: Change your theme as wordpress default theme, if the js error not happen again, this means in your theme have codes which using replace method, you can find out the replace code line and find out the error.

    3: If theme is works well, you can deactivate your plugins one by one to find which plugin have this code line.

    4: If theme and plugin have no this code line, maybe this is some peopel generated it in your theme options or plugins panels, for example, many theme and plugin have custom css or custom js text area, you can just check in and use /* code */ to comment / disable them, and do a check again.

    5: Actually, when you debug your JS in your console log in browser, the problems is often not only caused by this js error, if you check more clearly in console log, maybe you will find before this js error, your plugin or your theme have more js errors which will caused next code lines have many error, so the first thing need to find the js problem is find your first js error, this can solve your error more quicker. ๐Ÿ™‚

    Hope this have a little help? ๐Ÿ™‚

    Best Regards,
    Tomas


    gba
    Participant

    Hi!
    Thank you for your extensive reply.
    Did you have a look at the website concerned?
    Kind regards,
    Gerald


    Tomas Zhu
    Keymaster

    Hi Gerald,

    Thanks for the message. ๐Ÿ™‚

    I have released a new version, could you please update the newest version and do a check are there any problem yet?

    Thanks, have a great day, ๐Ÿ™‚

    Best Regards,
    Tomas


    gba
    Participant

    Hi!

    Where do I find the new version?
    In WordPress plugins the latest version is 4.0.9

    Kind regards,
    Gerald


    Tomas Zhu
    Keymaster

    Hi Gerald,

    Thanks for the message. ๐Ÿ™‚

    Yes, please download it from https://wordpress.org/plugins/wordpress-tooltips/, the version is 4.0.9 — https://downloads.wordpress.org/plugin/wordpress-tooltips.zip, also if you are using wordpress, you can upgrade in your plugins page directly. ๐Ÿ™‚

    Best Regards,
    Tomas


    gba
    Participant

    Hi!
    I already DO have version 4.0.9 ๐Ÿ™‚
    But there is now another error which is caused by single quotes.
    Please have a look at the console.

    • This reply was modified 3 months ago by  gba.

    gba
    Participant

    Additional info:

    On this page it works:
    http://dsw.dwpro.at/10/details/ (look for the phrase ‘SEO’ – it has a tooltip)
    On this one not:
    http://dsw.dwpro.at/10/#layouts (look at the price table – it also contains the phrase SEO, but has no tooltip)


    gba
    Participant

    Hi again!
    Maybe it is just a timing problem – your plugin adds tooltips before the page is fully loaded.
    How can I run the function, that adds the tooltips, manually for testing?


    Tomas Zhu
    Keymaster

    Hi Gerald,

    My site is running on the wordpress tooltips 4.0.9 too, but I can not found any javascript in console?

    For example, could you please do a check at https://tomas.zhu.bz/wordpress-tag-cloud-plugin-3d-tag-cloud.html/ ? In this page, you can find I have tooltips too, if you check in browser console, you will find there are no any error.

    Just like I mentioned above, could you please:
    1: Full backup your site, include folders and database, please note, before you do anything, full backup your site, so your site and your users is always in zero risk, no matter what happen.

    2: Change your theme as wordpress default theme, if the js error not happen again, this means in your theme have codes which using replace method, you can find out the replace code line and find out the error.

    3: If theme is works well, you can deactivate your plugins one by one to find which plugin have this code line.

    4: If theme and plugin have no this code line, maybe this is some peopel generated it in your theme options or plugins panels, for example, many theme and plugin have custom css or custom js text area, you can just check in and use /* code */ to comment / disable them, and do a check again.

    5: Actually, when you debug your JS in your console log in browser, the problems is often not only caused by this js error, if you check more clearly in console log, maybe you will find before this js error, your plugin or your theme have more js errors which will caused next code lines have many error, so the first thing need to find the js problem is find your first js error, this can solve your error more quicker.

    Could you please follow my suggestion and tell me is the theme problem or plugin confict or anything caused your problem? Thanks. ๐Ÿ™‚

    Best Regards,
    Tomas

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.