- Posts: 640
- Thank you received: 16
Custom field "Ajax Image" not deleting it's content after save
- PeterChain
-
Topic Author
- Offline
Less
More
6 years 6 months ago #316421
by PeterChain
-- HikaShop version -- : 4.2.3
-- HikaMarket version -- : 3.0.3
-- Joomla version -- : 3.9.15
-- PHP version -- : 7.1.12
Hi,
We have configured a custom field for the table category to use the field type "Ajax Image".
The upload of the image works fine.
But when clicking the delete button and applying changes, the image persists, it doesn't get deleted.
Reproducing the same delete action via Hikashop in the backend works fine.
I have tried the same with a custom field "Ajax Image" in the table product and the same problem happens.
Steps to reproduce the problem:
1. Edit a category with a custom field of the type "Ajax Image"
2. Upload an image
3. Save the changes
4. Return to edit the same category
5. Delete the image inside the custom field
6. Save the changes
7. When entering again in the category, the image has not been deleted.
I have tried it again in a fresh joomla site with protostar and without any customization to get the same effect.
--
Víctor
-- HikaMarket version -- : 3.0.3
-- Joomla version -- : 3.9.15
-- PHP version -- : 7.1.12
Hi,
We have configured a custom field for the table category to use the field type "Ajax Image".
The upload of the image works fine.
But when clicking the delete button and applying changes, the image persists, it doesn't get deleted.
Reproducing the same delete action via Hikashop in the backend works fine.
I have tried the same with a custom field "Ajax Image" in the table product and the same problem happens.
Steps to reproduce the problem:
1. Edit a category with a custom field of the type "Ajax Image"
2. Upload an image
3. Save the changes
4. Return to edit the same category
5. Delete the image inside the custom field
6. Save the changes
7. When entering again in the category, the image has not been deleted.
I have tried it again in a fresh joomla site with protostar and without any customization to get the same effect.
--
Víctor
Please Log in or Create an account to join the conversation.
6 years 6 months ago #316443
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom field "Ajax Image" not deleting it's content after save
Hello,
Thanks for the report.
Please edit the file "administrator/components/com_hikamarket/classes/category.php" and replace the line
By
We will include that patch in the next release.
Regards,
Thanks for the report.
Please edit the file "administrator/components/com_hikamarket/classes/category.php" and replace the line
Code:
$category = $fieldsClass->getInput('category', $oldCategory);
Code:
$category = $fieldsClass->getInput('category', $oldCategory, true, 'data', false, 'display:vendor_category_edit');
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- PeterChain
-
Topic Author
- Offline
Less
More
- Posts: 640
- Thank you received: 16
6 years 6 months ago #316457
by PeterChain
Replied by PeterChain on topic Custom field "Ajax Image" not deleting it's content after save
Hi again,
I have made the changes, but the problem persists.
When I delete the image and click on "Apply" or "Save" it seems like the form is rejecting the save and returns to the form without any message of success or failure of the save.
Thanks.
--
Víctor
I have made the changes, but the problem persists.
When I delete the image and click on "Apply" or "Save" it seems like the form is rejecting the save and returns to the form without any message of success or failure of the save.
Thanks.
--
Víctor
Please Log in or Create an account to join the conversation.
6 years 6 months ago #316485
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom field "Ajax Image" not deleting it's content after save
Hello,
The rest is an issue in HikaShop front-end upload "image_entry" view.
If you compare with the same "image_view" but in the backend, you will see that there is more code to handle the "delete" :
Regards,
The rest is an issue in HikaShop front-end upload "image_entry" view.
If you compare with the same "image_view" but in the backend, you will see that there is more code to handle the "delete" :
Code:
if(!empty($this->params->delete) && !empty($this->params->uploader_id)) {
$p = '';
if(!empty($this->params->field_name))
$p = ',\'' . $this->params->field_name . '\'';
?>
<a href="#delete" class="deleteImg" onclick="return window.hkUploaderList['<?php echo $this->params->uploader_id; ?>'].delImage(this<?php echo $p;?>);" title="<?php echo JText::_('HIKA_DELETE'); ?>"><i class="fa fa-times"></i></a>
<?php
}
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.221 seconds