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

Unable to index/reindex from admin panel or click on the index shortcut icon #73

Open
simmytruong opened this issue Jul 1, 2019 · 4 comments

Comments

@simmytruong
Copy link

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.

@rhukster
Copy link
Member

rhukster commented Aug 9, 2019

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.

@rhukster
Copy link
Member

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.

@simmytruong
Copy link
Author

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".

@rhukster
Copy link
Member

Please try with latest release.

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

No branches or pull requests

2 participants