grav-plugin-tntsearch icon indicating copy to clipboard operation
grav-plugin-tntsearch copied to clipboard

Error when searching for certain keywords

Open rvreugde opened this issue 5 years ago • 8 comments

When I want to search for certain keywords, e.g. "win" or "wik", then TNTSearch pops up with an error:

Call to a member function parsedownElement() on int

TNTSearch version: 3.0.0 Grav Version: 1.6.7

rvreugde avatar Apr 23 '19 07:04 rvreugde

Also, re-indexing the contents returns an error: Call to a member function parsedownElement() on int

rafvandevreugde avatar Apr 26 '19 08:04 rafvandevreugde

Is it possible to get a sample user-pages.zip file that contains some example pages that causes this issues? I am not able to replicate in my testing.

rhukster avatar Apr 26 '19 17:04 rhukster

Hello Andy,

The content of our website is quite confidential and I rather not like to send the user pages.

Is there a logfile that can be generated?

Regards,

Raf van de Vreugde

On 4/26/19 7:51 PM, Andy Miller wrote:

Is it possible to get a sample user-pages.zip file that contains some example pages that causes this issues? I am not able to replicate in my testing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/trilbymedia/grav-plugin-tntsearch/issues/67#issuecomment-487144572, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH44W3CM7B7IZQDLIFEUF4LPSM6LVANCNFSM4HHVMIKQ.

rafvandevreugde avatar May 06 '19 09:05 rafvandevreugde

Hello Andy,

I have send the page to you personally. The error I got when I invoke the indexing via CLI is:

[root@SRV-TST-005 ictdocs2.ap.be]# bin/plugin tntsearch index

Re-indexing

PHP Fatal error: Uncaught Error: Call to a member function parsedownElement() on int in /var/www/ictdocs2.ap.be/system/src/Grav/Common/Page/Medium/Link.php:46 Stack trace: #0 /var/www/ictdocs2.ap.be/system/src/Grav/Common/Helpers/Excerpts.php(258): Grav\Common\Page\Medium\Link->parsedownElement('', '', '', '', true) #1 /var/www/ictdocs2.ap.be/system/src/Grav/Common/Markdown/ParsedownGravTrait.php(213): Grav\Common\Helpers\Excerpts::processImageExcerpt(Array, Object(Grav\Common\Page\Page)) #2 /var/www/ictdocs2.ap.be/vendor/erusev/parsedown/Parsedown.php(1016): Grav\Common\Markdown\Parsedown->inlineImage(Array) #3 /var/www/ictdocs2.ap.be/vendor/erusev/parsedown/Parsedown.php(1425): Parsedown->line('\n #4 /var/www/ictdocs2.ap.be/vendor/erusev/parsedown/Parsedown.php(271): Parsedown->element(Array) #5 /var/www/ictdocs2.ap.be/vendor/erusev/parsedown/Parsedown.php(1460): Parsedown->lines(Array) #6 /var/www/ictdocs2.ap.be/vendor/erusev/parsedown/Parsedown.php(1425): Parsedown->li(Array) #7 /var/www/ictdocs2.ap.be/ in /var/www/ictdocs2.ap.be/system/src/Grav/Common/Page/Medium/Link.php on line 46

Regards,

Raf

rafvandevreugde avatar May 06 '19 13:05 rafvandevreugde

Did you send it via email? to getgrav.org? or trilbymedia.com?

rhukster avatar May 06 '19 23:05 rhukster

Hello Andy,

I have send it via mail ([email protected]mailto:[email protected]). I'll send it again to this e-mail address.

Regards,

Raf

On 5/7/19 1:41 AM, Andy Miller wrote:

Did you send it via email? to getgrav.org? or trilbymedia.com?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/trilbymedia/grav-plugin-tntsearch/issues/67#issuecomment-489826117, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH44W3FNWCZSKKI3CSRLTCLPUC63PANCNFSM4HHVMIKQ.

rafvandevreugde avatar May 07 '19 06:05 rafvandevreugde

Then you sent it to github :)

Please send it to rhuk(at)getgrav.org

rhukster avatar May 07 '19 20:05 rhukster

I copied your page into a test-page on my test site.

Indexing was fine:

$ bin/plugin tntsearch index                

Re-indexing

Added   1 /core/blog/daring-fireball-link
Added   2 /core/blog/text-typography
Added   3 /core/blog/random-thoughts
Added   4 /core/blog/the-urban-jungle
Added   5 /core/blog/classic-modern-architecture
Added   6 /core/blog/focus-and-blur
Added   7 /core/blog/london-at-night
Added   8 /core/blog/hero-classes
Added   9 /core/slug2
Added   10 /core/issues/atom-vs-coda
Added   11 /core/plugins/smartypants
Skipped 12 /sub-folder/test-02/assets/redirect - redirect only...
Added   13 /test-page
Total rows 12


Indexed in 0.5s

And also searching was fine too:

Image 2019-05-09 at 9 55 06 AM

So must be a plugin or something?

rhukster avatar May 09 '19 15:05 rhukster