-
Twig Caching Issues in Acquia Cloud Enterprise
I’ve recently run into an issue where my site (on Acquia Cloud Enterprise) has node displays that were flip-flopping between an older version of a Twig template file, and the most recent version. I tried all combinations of drush cr, varnish cache clearing, and clearing the cache through the Drupal UI.
After reading through No reliable method exists for clearing the Twig cache, I landed on this page at Acquia: https://support.acquia.com/hc/en-us/articles/360005167754-Drupal-8-Twig-cache
I SSH’d into the production server I always SSH into, and I ran the command as shown. I did this repeatedly. I did a drush cr after. I did a drush cr before. Nothing was working. My pages were showing up with the old template, or the new template, and it seemed to be at random.
Ultimately I re-read the documentation page, more thoroughly this time, and discovered this: “connect to each web server instance and run a command like this…“
Ahah! EACH web server.
So, I logged into the Acquia Cloud interface, found the other production server’s connection string (myuser@someserver.prod.hosting.acquia.com), connected, and ran the same command. After another drush cr all of the pages were using the new template.
That’ll teach me to jump straight to executing commands without reading the instructions carefully.
-
Setting up xdebug for PHP 7 in Acquia DevDesktop
The Acquia DevDesktop help page says:
The PHP 7 version currently included with Acquia Dev Desktop does not currently include Xdebug. You can download an updated version of Xdebug here .
Here are the actual steps I used. YMMV.
123456789101112131415161718192021cd /Applications/DevDesktop/php7_0/extwget http://xdebug.org/files/xdebug-2.5.5.tgztar xvf xdebug-2.5.5.tgzrm xdebug-2.5.5.tgzcd xdebug-2.5.5/Applications/DevDesktop/php7_0/bin/phpize./configure --enable-xdebug CC="gcc -arch i386" CXX="g++ -arch i386" -with-php-config=/Applications/DevDesktop/php7_0/bin/php-configmakemv modules/xdebug.so ../cd ..rm -rf package.xml xdebug-2.5.5# Edit /Applications/DevDesktop/php7_0/bin/php.ini# Add these lines:zend_extension="/Applications/DevDesktop/php7_0/ext/xdebug.so"xdebug.remote_enable=1xdebug.remote_log=/tmp/xdebug.log# Restart DevDesktop services