Need a special offer?Find out if your project fits.
+

Uncaught TypeError: Cannot read property 'string' of undefined

Answered
Jyoti asked on August 9, 2019

Hi, 
We are using and loading react files for other part of the website. But we are not using react with flexmonster.
I am trying to use Flexmonster component with jQuery JavaScript Library v1.11.3 and jQuery UI - v1.8.23 - 2012-08-15.
I am getting error Uncaught TypeError: Cannot read property 'string' of undefined at flexmonster.js:19 even though I am not using flexmonster with react.
Please help.

14 answers

Public
Vera Didenko Vera Didenko Flexmonster August 12, 2019

Hello,
 
Thank you for writing to us.
 
Our team has not managed to reproduce the issue you have described.
 
Could you please provide a sample where the issue is reproducible?
Any sensitive information can be sent via email.

This will greatly help us to determine the cause of the problem.
 
Waiting for your response.
 
Best Regards,
Vera

Public
Jyoti August 12, 2019

Hi,
I will not be able to give sample. But attaching the screen shot of what is happening. 
Basically, in the website react is loaded. But we are not using proptypes in our application where we are using react framework. But rest of the part of the application uses jquery. We used flexmonster with jquery. But as react is loaded and not proptypes used in the application, we are getting the error in flexmonster.js file.
 

Public
Jyoti August 12, 2019

Hi,
While executing on IE browser, it is displaying the error as in attached screenshot.

Public
Vera Didenko Vera Didenko Flexmonster August 12, 2019

Hello,
 
Thank you for your response.
 
We kindly suggest checking out our integration with React guide: https://www.flexmonster.com/doc/integration-with-react/.

Please let us know if this helps.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
Jyoti August 13, 2019

Hi,
I have already gone through the link you have provided. We already have the files mentioned there. The link is of no use to me in current issue. The issue is as already specified previously, though I am not using react with flexmonster, it throwing the error related to it. In flexmonster.js, there is a check 0 !== window.React which is true in my case as we have react related files loaded and hence getting the error. I do not understand that if I am not using react with flexmonster, why it should throw these kind of errors.
And this is working fine with chrome browser, but giving errors in Mozilla and IE browsers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster August 13, 2019

Hello Jyoti,
Thank you for the detailed explanation. 
We have managed to reproduce such an issue on our side. The cause of the issue is that from the React version 15.5 PropTypes is not a part of React library: https://reactjs.org/docs/typechecking-with-proptypes.html.
Our dev team is going to add the necessary update to resolve the issue, ETA Aug 27.
As a temporary solution, you can either comment or remove minified lines from 19 to 22, including 22.
Please let us know in case of any other question.
Regards,
Dmytro

Public
Jyoti August 14, 2019

Hi Dmytro,
After removing above specified lines, it is working fine  with IE and chrome. But not working with firefox.

Public
Ian Sadovy Ian Sadovy Flexmonster August 14, 2019

Hello Jyoti,
 
Great to hear it works with IE and Chrome.
As for Firefox, do you have the same error? If yes, we recommend clearing the browser cache, because the old version of flexmonster.js can be cached.
 
Please let us know if it works.
 
Regards,
Ian

Public
Jyoti August 14, 2019

Hi Ian,
I have already tried clearing cache. I am getting error as below in firefox.
Something went wrong.
To fix the issue please try the following:
1. Check if the componentFolder parameter is defined correctly.
2. Check if the path to the css file is valid.
3. Check if DevTools (press F12) has an exception.
4. Ask the support team for help (https://www.flexmonster.com/technical-support/
La flexmonster.js:32820
Tia flexmonster.js:32819

Public
Vera Didenko Vera Didenko Flexmonster August 15, 2019

Hello, Jyoti,
 
 
Thank you for response and for specifying the error you have encountered.
 
We have not managed to reproduce the issue.
 
 
Please consider sending us a sample with dummy data via email so that we can help you solve the problem.
This is essential for our team to be able to provide the appropriate solution for your case.
 
 
We are looking forward to hearing from you.
 
 
Best Regards,
Vera

Public
Jyoti August 16, 2019

Hi Vera,
As I already specified, I am not able to give sample as it will be another big task for me for which I do not have the time.

Public
Jyoti August 16, 2019

Hi Vera,
Can I keep stylesheet and .less files of flexmonster component in separate folder than where javascript files folder is kept? Can I add these file in css bundle and javascript bundle?

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster August 16, 2019

Hello Jyoti,
Thank you for writing.
We have checked the case but the issue is not reproducible on our side.
When the issue occurs only in some browser it is very difficult to define the cause of the problem without a reliable sample with steps for reproducing.

Currently, we recommend you carefully checking our guides with the best practices for integration: https://www.flexmonster.com/doc/integration-with-jquery/, https://www.flexmonster.com/doc/how-to-create-js-pivottable/. We suppose that some conflicts with your existing architecture may cause the issue.

As for the stylesheet files and .less files, we recommend keeping them into flexmonster folder with all the other resources. Please note that the componentFolder should have the correct reference to that folder.

Let us know if the information above was helpful.
Regards,
Dmytro

Public
Vera Didenko Vera Didenko Flexmonster August 28, 2019

Hello, Jyoti,
 
We are glad to announce that the check for external CSS files in Firefox was fixed.
 
This is provided in the 2.7.13 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component.
Here is our updating to the latest version tutorial for guidance: https://www.flexmonster.com/doc/updating-to-the-latest-version/ .
 
Please contact us in case any questions arise.
 
Best Regards,
Vera

Please login or Register to Submit Answer