- Using Liferay Generator prepare a react widget named my-testing-portlet (later on you can replace the directories src, assets and features with the ones from the attached my-testing-portlet.zip ).
- After replacing the directories deploy your react-widget bundle
- In portal, go to Site builder --> Pages and add a widget page
- Add My Testing Portlet to the page and go to Configuration
- In Setup, change the value of 'favourite drink'
TypeError: Cannot read property 'get' of undefined appears in the console and the value is not being saved in portletpreferencevalue table in DB.
Value should be possible to change on the screen and stored in the portletpreferencevalue table.
Bundle: Liferay EE
Database: MySQL 5.7
Last Commit: e5c990ea1b4b0be505332a28b101ec29cb9b6141
- Chrome Latest
Notes: It is possible to store the value of the Setup by going to the Sharing tab first. When again on Setup tab the value is being saved correctly both on the screen and in the DB table.
We have some ReactJS portlets which are generated with the 'generator-liferay-js' and our portlets has custom configurations.
In Liferay 7.3.7-GA8 the configurations are saved without any problems in database (postgres 11).
But, in Liferay 7.4.1 the configurations could not be persisted (postgres 12).
Existing configurations of a ReactJS Portlet could be loaded from DB.
If we try to save the configuration (in Liferays page editor) the configuration modal calls the '/o/dynamic-data-mapping-form-context-provider' endpoint. The Response has a HTTP 200 status code. But in the developer tools of the browser we get an error with the message: "TypeError: Cannot read property 'get' of undefined".
If we generate a new 'testing-like' portlet by the 'generator-liferay-js' with sample code (it contains sample configuration) and deploy this portlet into Liferay 7.4.1, we are not able to save the configuration.
Versions we use:
- 'generator-liferay-js' --> latest
- 'liferay-npm-bundler' --> '2.26.0'
- 'liferay-npm-build-support' --> '2.26.0'
- MANIFEST.MF: osgi.extender;filter:="(&(osgi.extender=liferay.frontend.js.portlet)(version>=1.1.0))"
Steps to reproduce:
- Create a React Widget by 'generator-liferay-js' with sample code
- Run 'npm run build' for the portlet
- Deploy Portlet to Liferay 7.4.1
- Go into the page editor and add the deployed portlet into your page
- Open the configuration of the portlet and change the configuration
- Click the save button