Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
Laravel framework version: 10.13.5
Aimeos Laravel version: ~2023.04
PHP Version: 8.2.7
Environment: Linux
The error occurs when I go to a product details page:
/admin/default/jqadm/get/product/<product id>
Error: Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
The error occurs on line 162 here: vendor/aimeos/ai-admin-jqadm/js/product.js
"name" is undefined.
Aimeos Laravel version: ~2023.04
PHP Version: 8.2.7
Environment: Linux
The error occurs when I go to a product details page:
/admin/default/jqadm/get/product/<product id>
Error: Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
The error occurs on line 162 here: vendor/aimeos/ai-admin-jqadm/js/product.js
Code: Select all
for(entry of $('.item-product .item-characteristic-attribute .attribute-list')) {
const name = $(entry).attr('id');
components.push({
name: name.replace(/-/, '/'),
el: '#' + name,
data: {
items: $(entry).data("items"),
keys: $(entry).data("keys"),
prefix: $(entry).data("prefix"),
siteid: $(entry).data("siteid"),
listtype: $(entry).data("listtype")
},
mixins: [Aimeos.Product.Attribute.mixins.bind(this)()]
})
}
Code: Select all
name: name.replace(/-/, '/')
Re: Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
The error seems to have been fixed now.
aimeos-admin-jqadm has been updated to 2023.04.8
aimeos-admin-jqadm has been updated to 2023.04.8
Re: Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
Introduced because you've copied the file from dev-master to you setup.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
