• Resolved flaviusv

    (@flaviusv)


    hi,

    i tried to install the last version from WP and I get the fatal error below. Could you please help? Thx!

    Fatal error: Cannot redeclare twig_cycle() (previously declared in /home/[notdisclosed]/public_html/wp-content/plugins/wp-rss-aggregator/vendor/twig/twig/src/Extension/CoreExtension.php:327) in /home/[notdiscosed]/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/twig/twig/src/Resources/core.php on line 24

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WPSolr free

    (@wpsolr)

    This error occurs because the twig_cycle() function is being declared twice. It seems that both the WP RSS Aggregator plugin and WPSOLR plugin are using the Twig templating library, and each is loading a different version or a conflicting part of Twig, leading to a function redeclaration.

    WPSOLR always try to use the latest external library version, which includes the latest security fixes.
    Here Twig 3.14.0 (2024-09-09)

    Thread Starter flaviusv

    (@flaviusv)

    We have seen the conflict, but we cannot uninstall wp rss. Could you suggest how we can fix this?

    Thank you!

    Plugin Author WPSolr free

    (@wpsolr)

    You might edit the Twig file in one of the plugins to wrap the twig_cycle() function in a conditional to prevent redeclaration.

    In the WPSOLR plugin, open the file:

    /home/[notdisclosed]/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/twig/twig/src/Resources/core.php

    Wrap the twig_cycle() function definition with a check to see if it’s already been declared:

    if (!function_exists('twig_cycle')) { function twig_cycle() { // function code here } }

    But the same issue on other methods could also happen.

    Plugin Author WPSolr free

    (@wpsolr)

    I installed the WP RSS Aggregator plugin, and it appears to use a five-year-old version of Twig (v1.41.0) from Twig’s repository.

    Unfortunately, I don’t believe we can run easily both Twig versions simultaneously without conflicts.

    Thread Starter flaviusv

    (@flaviusv)

    Thank you very much for investigating further our issue. We cannot modify that function because on the next update the modification would be lost, so we already have decided to uninstall wp rss plugin and move the feeds to another plugin. We need more WP Solr than wp rss, because we want to improve the search engine and we contemplate to install weaviate or vespa, but we not sure which one yet.

    Thanks!

    Plugin Author WPSolr free

    (@wpsolr)

    Nice.

    Vespa.ai offers multi-stage hybrid ranking and supports ColBERT models, which are very trendy these days.

    With Weaviate, you will get ready-to-use multimodal models with local embedders, like CLIP.

    Thread Starter flaviusv

    (@flaviusv)

    We have a lot of documentation to read on regard, first of all ?? The Weaviate has QA integrated which can be used out-of-the box with WP Solr, but we have to figure it out how to display it in an overlay on post pages for summarizing the posts on demand, among a lot of other things, like using jina-embeddings-v-3 and its segmenter API for chunking and embedding or voyage-law-2 (because we will have legal content on the website in romanian language), just to mention a few.

    Thanks a lot again!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.