Shortcode generates critical error when TWIG is enabled

When I enabled TWIG on the harvardhistory.org website, the shortcode integrating CatalogIt content gives a critical error. I am giving you access to the staging site in the secured note.
I disabled TWIG for now. Open the page https://staging.harvardhistory.org/collections/
The bottom part is generated by the CatalogIt plugin which is called by a shortcode in Raw content.
Enable TWIG and you will now get a critical error. I tried several alternative syntaxes in the raw content, including using the do_shortcode() function, but I can’t get it to work. Am I doing something wrong or is the problem in the plugin itself?
Thanks for your help,
Patrick

Hey Patrick,

Thanks for writing in! The site is locked.

  • See the secure note below.

What is the CatalogIt shortcode? Does it uses twig or added with the Twig code? Please provide the example shortcode. The plugin may also not be compatible with the latest PHP version.

Best Regards.

Yes it is locked. Please use the username and password in the secure note to login. The page where the shortcode is used is also mentioned in the secure note.
Cheers,
Patrick

Hi Patrick

I have checked and found the catalogit_folders_shortcode shortcode is the reason behind your problem. As it is a 3rd Party plugin and we don’t have any control over the code, I would suggest you contact the Plugin Author on this and let us know the feedback.
I would also suggest you please add the below-given code into your wp-config.php for debug setup and the error logged into the file name debug.log inside the wp-content folder.

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
//SET PHP INI DISPLAY ERROR FALSE
@ini_set( 'display_errors', 0 );

Please find the video that will help you to edit wp-config.php and add the above code: https://www.youtube.com/watch?v=3SDPTafEM8o
And let the Plugin Author share the debug.log file to recognize the error at your end.

Thanks

Thanks, I will add the debug code and contact CatalogIt.

Hi Patrick

Please let us know the feedback from the Plugin Author on this.

Thanks

Hi,
Here is the feedback from Catalogit. After contacting them, I got an updated version which fixed the problem. The problem with them is that they don’t follow the WP procedures. I mean every plugin I use tells you when there is a new version. Not Catalogit. On top of that there is no mention of the new version anywhere on their support site.
Anyway, I got their latest version and it fixed the problem.
Thanks for pointing me in the right direction,
Patrick