Delete doesn't work
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!
Delete doesn't work
Hi!
When I click on the icon to delete (in any of the tables in the administrative part), it does not delete the resource.
In the browser console you can see the following error:
TypeError: Cannot read properties of undefined (reading 'target')
at Vue.askDelete (js?locale=en:5431:25)
I am using the latest version of Laravel Aimeos (2022.07.2).
Regards,
When I click on the icon to delete (in any of the tables in the administrative part), it does not delete the resource.
In the browser console you can see the following error:
TypeError: Cannot read properties of undefined (reading 'target')
at Vue.askDelete (js?locale=en:5431:25)
I am using the latest version of Laravel Aimeos (2022.07.2).
Regards,
Re: Delete doesn't work
We can't reproduce that. Can you please post a screenshot?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Delete doesn't work
Hi,
Sure, I share a screenshot with you. When I click on the icon to delete, it does not work and shows that error in the console.
Regards,
Sure, I share a screenshot with you. When I click on the icon to delete, it does not work and shows that error in the console.
Regards,
- Attachments
-
- delete errror.PNG (65.39 KiB) Viewed 2654 times
Re: Delete doesn't work
Thanks, this has been fixed in the latest release. Please run "composer up" to get the latest version.
The languages will be added again by "artisan aimeos:setup" so you should disable them instead if you don't need them.
The languages will be added again by "artisan aimeos:setup" so you should disable them instead if you don't need them.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Delete doesn't work
Hello Sir,
I have run composer up, then cleared all caches and the issue persists
I have run composer up, then cleared all caches and the issue persists
Re: Delete doesn't work
We need a bit help now.
Can you verify that this line is exactly the same in your ./vendor/aimeos/ai-admin-jqadm/templates/admin/jqadm/locale/language/list.php file?
https://github.com/aimeos/ai-admin-jqad ... t.php#L266
Furthermore, please add this:
Here: https://github.com/aimeos/ai-admin-jqad ... in.js#L897
Then, post the output from the browser console.
Can you verify that this line is exactly the same in your ./vendor/aimeos/ai-admin-jqadm/templates/admin/jqadm/locale/language/list.php file?
https://github.com/aimeos/ai-admin-jqad ... t.php#L266
Furthermore, please add this:
Code: Select all
console.log(ev);
Then, post the output from the browser console.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Delete doesn't work
Hello Sir,
Thank you very much for your prompt response,
The line of code is different in packages/my-theme/templates/admin/jqadm/locale/language/list.php
It is as follows:
Added the console.log(ev) to vendor/aimeos/ai-admin-jqadm/js/admin.js
Attached screenshot.
Best regards,
Thank you very much for your prompt response,
The line of code is different in packages/my-theme/templates/admin/jqadm/locale/language/list.php
It is as follows:
Code: Select all
<a class="btn act-delete fa" tabindex="1" href="#"
v-on:click.prevent.stop="askDelete(`<?= $enc->js( $id ) ?>`)"
title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ) ?>"
aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ) ?>">
</a>
Attached screenshot.
Best regards,
- Attachments
-
- console-admin-js.PNG (20.65 KiB) Viewed 2588 times
Re: Delete doesn't work
I added $event to the line of code:
Now when I press the delete icon the confirmation modal to delete appears, however when I click delete the page reloads and the resource I tried to delete is still there, it is not deleting.
Code: Select all
<a
class="btn act-delete fa"
tabindex="1"
v-on:click.prevent.stop="askDelete(`<?= $enc->js( $id ) ?>`, $event)"
href="#"
title="<?= $enc->attr( $this->translate( 'admin', 'Delete this entry' ) ) ?>"
aria-label="<?= $enc->attr( $this->translate( 'admin', 'Delete' ) ) ?>"
>
</a>
Now when I press the delete icon the confirmation modal to delete appears, however when I click delete the page reloads and the resource I tried to delete is still there, it is not deleting.
Re: Delete doesn't work
That's because your href value is wrong and it needs to be like in the original template:
https://github.com/aimeos/ai-admin-jqad ... t.php#L267
https://github.com/aimeos/ai-admin-jqad ... t.php#L267
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Delete doesn't work
I started the theme by downloading the base files from the aimeos online tool.
I have modified the href anyway so that the resources can be removed.
Now it works fine!
Thank you very much for your help!
I have modified the href anyway so that the resources can be removed.
Now it works fine!
Thank you very much for your help!