Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS reindex always strip tags #36

Open
maximgubar opened this issue Nov 4, 2020 · 2 comments
Open

CMS reindex always strip tags #36

maximgubar opened this issue Nov 4, 2020 · 2 comments

Comments

@maximgubar
Copy link

Preconditions

Magento Version : 2.4.1

Module Elasticsuite Cms Search Version : 2.2.8

Environment : Developer

Third party modules :

Steps to reproduce

  1. Create CMS Page
  2. Execute reindex
  3. Browse elastic index for correspondent document

Expected result

  1. CMS Page content value is saved as it is (with html tags)

Actual result

  1. CMS Page content is fully stripped, no html tags are present
@maximgubar
Copy link
Author

maximgubar commented Nov 4, 2020

Of course, there is possibility to solve this issue by injecting 'NullStripper' in DI:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Smile\ElasticsuiteCms\Model\Page\Indexer\Fulltext\Action\Full">
        <arguments>
            <argument name="stripTags" xsi:type="object">Drinks\StorefrontBridge\Magento\Framework\Filter\RemoveTagsNull</argument>
        </arguments>
    </type>
</config>
<?php

namespace Drinks\StorefrontBridge\Magento\Framework\Filter;

class RemoveTagsNull extends \Magento\Framework\Filter\RemoveTags
{
    public function filter($value)
    {
        return $value;
    }
}

but it would be really nice if this could be configured in the admin panel.

@maximgubar
Copy link
Author

or even better, to have both stripped and not stripped data in index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant