Title: PHP Fatal Error using msdyncrm_twig shortcode
Last modified: April 15, 2022

---

# PHP Fatal Error using msdyncrm_twig shortcode

 *  Resolved [lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * (@lucasflorian2)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/)
 * Hello,
 * I tried to use the following shortcode in a page :
 * [msdyncrm_twig]
    {% form entity=”lead” name=”WEB_contact” mode=”create” %}{% 
   endform %} [/msdyncrm_twig]
 * I get the following PHP error :
 * PHP Fatal error: Declaration of AlexaCRM\WordpressCRM\Cache\TwigCache::generateKey(
   string $name, string $className): string must be compatible with Twig\Cache\FilesystemCache::
   generateKey($name, $className) in [XXX]/wp-content/plugins/integration-dynamics/
   src/Cache/TwigCache.php on line 34
 * I commented the Alexa TwigCache generateKey function so the code uses the super
   class function instead and it works, is there a bug or did I configure something
   wrong ?
 * The diffenrence I see is that the Alexa implementation generates a key finishing
   by “html” instead of “php” in the Twig original version
 * Have a nice day.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [alexacrm](https://wordpress.org/support/users/alexacrm/)
 * (@alexacrm)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15563065)
 * [@lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * I have no idea why it’s causing drama on your system, the function signatures
   are correct and it does not look like a bug at all.
 * – What version of PHP are you running?
    – Do you have any Twig instances from
   other plugins?
 * Thanks
    George
 *  Thread Starter [lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * (@lucasflorian2)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15563564)
 * Hi George,
 * I’m running on PHP 8.0.8.
    And yes my website uses Twig for templating instead
   of classic PHP : [https://fr.wordpress.org/plugins/timber-library/](https://fr.wordpress.org/plugins/timber-library/)
 * Thanks,
    Florian
 *  Plugin Author [alexacrm](https://wordpress.org/support/users/alexacrm/)
 * (@alexacrm)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15570848)
 * [@lucasflorian2](https://wordpress.org/support/users/lucasflorian2/) do you know
   the version of Twig that your timber library is using? I suspect libraries conflict.
   Even though we instantiate twig independently we found that using different major
   versions (e.g. 2 and 3) could potentially cause some drama.
 * Commenting out the code may work. The reason behind custom cache key generation
   is that default php extension is immediately flagged as readonly file and cache
   simply does not work. But I’m at loss why the error is there in the first place.
   The signature literally refers to the very function source code.
 *  Thread Starter [lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * (@lucasflorian2)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15571387)
 * Timber uses the version 1.42.5 (2020-02-11) of Twig to keep the compatibility
   with PHP 5.6 :(.
 * Another version of the Timber Library (using composer and not the WP Plugin system)
   is available with Twig 2.x. Would it be compatible with Alexa’s version of twig?
 *  Plugin Author [alexacrm](https://wordpress.org/support/users/alexacrm/)
 * (@alexacrm)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15571451)
 * [@lucasflorian2](https://wordpress.org/support/users/lucasflorian2/) I’m confused.
   You’re running PHP 8 but keep compatibility with PHP 5.6? And Twig 1.42 which
   contains tons of deprecated stuff and is not compatible. Version 2 _should_ be
   OK
 *  Thread Starter [lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * (@lucasflorian2)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15571522)
 * I don’t keep compatibility with php 5.6, the Timber library plugin does.
    I didn’t
   know the twig version was this old to be honest. I’ll try to upgrade to Timber
   2.x with Twig 2.x

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP Fatal Error using msdyncrm_twig shortcode’ is closed to new replies.

 * ![](https://ps.w.org/integration-dynamics/assets/icon-256x256.png?rev=1589904)
 * [Dynamics 365 Integration](https://wordpress.org/plugins/integration-dynamics/)
 * [Support Threads](https://wordpress.org/support/plugin/integration-dynamics/)
 * [Active Topics](https://wordpress.org/support/plugin/integration-dynamics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/integration-dynamics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/integration-dynamics/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [lucasflorian2](https://wordpress.org/support/users/lucasflorian2/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-using-msdyncrm_twig-shortcode/#post-15571522)
 * Status: resolved