Open simmytruong opened 5 years ago
I will need a copy of your site or some 'test' setup you can provide in order to debug this. It's something quite specific to your setup as I cannot replicate it.
I just found i was having this issue on Grav 'learn' skeleton, and it turns out from looking at the grav.log file that the error was coming from parsedown-extra:
[2019-08-14 18:08:27] grav.CRITICAL: Argument 1 passed to DOMNode::replaceChild() must be an instance of DOMNode, null given - Trace: #0 /Users/rhuk/Projects/grav/grav/vendor/erusev/parsedown-extra/ParsedownExtra.php(473): DOMNode->replaceChild(NULL, Object(DOMElement)) #1 /Users/rhuk/Projects/grav/grav/vendor/erusev/parsedown-extra/ParsedownExtra.php(228): ParsedownExtra->processTag('<html lang="{{ ...') #2 /Users/rhuk/Projects/grav/grav/vendor/erusev/parsedown/Parsedown.php(250): ParsedownExtra->blockMarkupComplete(Array) #3 /Users/rhuk/Projects/grav/grav/vendor/erusev/parsedown/Parsedown.php(39): Parsedown->lines(Array) #4 /Users/rhuk/Projects/grav/grav/vendor/erusev/parsedown-extra/ParsedownExtra.php(46): Parsedown->text('Often, the best...')
This is a particularly problematic extension for parsedown and causes lots of issues. I've disabled that and now tntsearch can index properly.
Hi Andy,
Thanks for your checking.
You are correct, the issue comes when we use the Grav 'Learn' Skeleton, it is totally a fresh version and then we use the Admin Panel and play with tntsearch button, we will encounter that issue.
I'm not sure what you disabled that makes tntsearch can index properly. But I also notice a way that I just remove the "03.pages" folder and then I can index without issue. It looks the tntsearch plugin conflicts with the content of a page in "03.pages".
Please try with latest release.
Hi,
I encounter the issue as below when I click on the "Index content" button:
"Argument 1 passed to DOMNode::replaceChild() must be an instance of DOMNode, null given"
And the detail errors are: "/var/www/grav-admin/vendor/erusev/parsedown-extra/ParsedownExtra.php(473): DOMNode->replaceChild(NULL, Object(DOMElement)) /var/www/grav-admin/vendor/erusev/parsedown-extra/ParsedownExtra.php(228): ParsedownExtra->processTag('<html lang="{{ ...') /var/www/grav-admin/vendor/erusev/parsedown/Parsedown.php(250): ParsedownExtra->blockMarkupComplete(Array) /var/www/grav-admin/vendor/erusev/parsedown/Parsedown.php(39): Parsedown->lines(Array) /var/www/grav-admin/vendor/erusev/parsedown-extra/ParsedownExtra.php(46): Parsedown->text('Often, the best...') /var/www/grav-admin/system/src/Grav/Common/Page/Page.php(849): ParsedownExtra->text('Often, the best...') /var/www/grav-admin/system/src/Grav/Common/Page/Page.php(725): Grav\Common\Page\Page->processMarkdown() /var/www/grav-admin/user/plugins/tntsearch/classes/GravTNTSearch.php(148): Grav\Common\Page\Page->content() /var/www/grav-admin/user/plugins/tntsearch/classes/GravTNTSearch.php(252): Grav\Plugin\TNTSearch\GravTNTSearch::getCleanContent(Object(Grav\Common\Page\Page)) /var/www/grav-admin/user/plugins/tntsearch/classes/GravConnector.php(61): Grav\Plugin\TNTSearch\GravTNTSearch->indexPageData(Object(Grav\Common\Page\Page)) "
If I use a command line as below: "bin/plugin tntsearch index" there is no issue appeared. So, I'm not sure why if I play with the admin panel, the issue happens.
For more info: I am using php7.3, grav1.6.11 and enable pdo_sqlite3, pdo_mysql...
Please help to have an advice.