You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supposed to be able to visit other products after visiting a product that doesn't have Product page title field.
Actual Behavior
Can't visit other products after visiting a product created without "product page title" field.
I get the following error in the console: ""Uncaught TypeError: Cannot read property 'substring' of undefined""
Steps to Reproduce the Behavior
To reproduce this behaviour, create some products by filling all their fields, then create another product without specifying "Product page title" field. Go back to the main page where you can see all the products, visit the product that doesn't have the "Product page title" field, go back to the main page again, then try to visit other products (You will not be able to do so).
The problem can be found in /reaction/lib/api/router/metadata.js line: 79.
In this line you have assigned product.pageTitle.substring(0, 160) to content field, and this is found in an if block where we check for ""product && product.description"".
I suggest changing product.pageTitle.substring(0, 160) to product.description.substring(0, 160) in line: 79
I would love to work on that.
The text was updated successfully, but these errors were encountered:
@riyadhzen Sorry this didn't get noticed before. Next time you can just submit a PR directly and we will get your fix in. Thanks for taking the time to look closely at the error.
Expected behavior
Supposed to be able to visit other products after visiting a product that doesn't have Product page title field.
Actual Behavior
Can't visit other products after visiting a product created without "product page title" field.
I get the following error in the console: ""Uncaught TypeError: Cannot read property 'substring' of undefined""
Steps to Reproduce the Behavior
To reproduce this behaviour, create some products by filling all their fields, then create another product without specifying "Product page title" field. Go back to the main page where you can see all the products, visit the product that doesn't have the "Product page title" field, go back to the main page again, then try to visit other products (You will not be able to do so).
The problem can be found in /reaction/lib/api/router/metadata.js line: 79.
In this line you have assigned product.pageTitle.substring(0, 160) to content field, and this is found in an if block where we check for ""product && product.description"".
I suggest changing product.pageTitle.substring(0, 160) to product.description.substring(0, 160) in line: 79
I would love to work on that.
The text was updated successfully, but these errors were encountered: