Closed yoannisj closed 4 months ago
@engram-design thanks for merging the proposed solution! Unfortunately, me and my colleagues just bumped into what seems to be a related error with the latest version of Vizy, when importing empty feed nodes into a Vizy field.
2024-02-08 08:00:25 [queue.ERROR] [TypeError] TypeError: Tiptap\Core\DOMParser::getDocumentBody(): Return value must be of type DOMElement, null returned in /var/www/html/vendor/ueberdosis/tiptap-php/src/Core/DOMParser.php:66
Stack trace:
#0 /var/www/html/vendor/ueberdosis/tiptap-php/src/Core/DOMParser.php(28): Tiptap\Core\DOMParser->getDocumentBody()
#1 /var/www/html/vendor/ueberdosis/tiptap-php/src/Editor.php(46): Tiptap\Core\DOMParser->process(‘’)
#2 /var/www/html/vendor/ueberdosis/tiptap-php/src/Editor.php(36): Tiptap\Editor->setContent(‘’)
#3 /var/www/html/vendor/verbb/vizy/src/integrations/feedme/fields/Vizy.php(47): Tiptap\Editor->__construct(Array)
#4 /var/www/html/vendor/craftcms/feed-me/src/services/Fields.php(230): verbb\vizy\integrations\feedme\fields\Vizy->parseField()
...
Can you post the XML you're using, if it's different from your original post? I'm testing with that, and things seem to be importing correctly for me.
I have just pushed up a potential fix for this regardless - if you can test it. To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.1.15"
.
Fixed in 2.1.16
Describe the bug
I am trying to import data from a legacy Wordpress website into Craft-CMS using Feed-Me, and mapping a rich-text field from Wordpress to a Vizy field in Craft-CMS. The expectation is that the rich-text is imported as a text into the Vizy field.
This works great for posts/entries where the rich-text field is not empty (i.e the XML node for the field in the Feed-Me feed is not empty). However, for posts/entries where the field is empty most part of the content is missing after the import and I can see the
Trying to access array offset on value of type null
error in Craft's log files:Steps to reproduce
richContent
(no need to setup block types)/data/post
<title>
<slug>
<content>
You should now see the successfully imported "Test Post With Content" entry in the Test Section, with its "Rich Content" field properly populated. The "Test Post Without Content" should be missing due to the bug reported here.
If you open the
storage/logs/queue-<date>.log
file you should see a line with theTrying to access array offset on value of type null
error message.Craft CMS version
4.3.4
Plugin version
2.0.9
Multi-site?
No
Additional context