Symfony error when using override from template

Currenty I’m building a website for a client and for the import of vehicles we use a plugin. The override in the /resources/ is working. For example if I place <?php the_title();?>in this file it shows me the title of the document.

But when I use the default formatting of the template it gives me errors like this:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function listing() on null in /site/wp-content/themes/pim/resources/view/voertuig/single.php:18

This is on line 18:
<?= $voertuig->listing('merk', 'model', 'brandstof', 'transmissie', 'tellerstand', 'prijs'); ?>

I’ve also asked the plugin builder to watch to this problem. He also tried some other things, but also got some errors

Notice: Undefined variable: wp_query in /site/wp-content/themes/pim/resources/view/voertuig/archive.php on line 23

Notice: Trying to get property 'found_posts' of non-object in /site/wp-content/themes/pim/resources/view/voertuig/archive.php on line 23

When I switch to twentynineteen theme the override works like a charm.

Any ideas of how to fix this issue or is there anyone who can point me in the right direction?

This topic was automatically closed after 42 days. New replies are no longer allowed.