0
Magento 2.4.5-p1

I have exported products from Magento 2.4.5-p1. When I open the CSV file and look at the Description column, some rows show the actual Product Description while many others show the following:

<div data-content-type="html" data-appearance="default" data-element

Why is that and how to fix?

1 Answer 1

2

This is due to the fact that along with the description, the page builder html gets into the attribute value.

I think you have some kind of customization.

What needs to be done: Before preparing data for export, apply the strip_tags() function to the description.

7
  • How do I do that please? Can I run something in PhpMyAdmin?
    – Allysin
    Sep 3, 2023 at 16:33
  • As I said earlier, it is necessary to prepare the data before they get into the data export, it is best to do this in the method that is responsible for preparing the data Sep 3, 2023 at 17:48
  • Sorry - I don't understand any of that. I'm clicking on System -) Data transfer -) Export -) Entity type = Products. I am exporting the product list so that I can import it on another Magento 2 instance. Surely, you're not suggesting I would go through 2000+ products manually and remove the HTML formatting from each product's description? What is the story here? Are HTML tags not allowed in Description on Magento 2? I don't have any customizations.
    – Allysin
    Sep 3, 2023 at 18:13
  • Write a simple php script to read the csv and clean up the description text.
    – paj
    Sep 4, 2023 at 8:11
  • @Allysin, contact your programmer with this problem, he will quickly fix it Sep 4, 2023 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.