Quality Work Make Your Dream Come True
WordPress BuddyPress bbPress Developer

HOME Forums WordPress Tooltips Plugin Support Cannot read property 'replace' of undefined Reply To: Cannot read property 'replace' of undefined


Tomas Zhu

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,

string(7) "9898001"