You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because it is interpreting the command line options after the intial drush command as relevant to Terminus, not Drush and won't know what to do with them.
Modified this helpful recipe from AgileAdam to be able to take a simple Drupal 8 taxonomy term reference field (field_ct_category), iterate through it and add links to the keyword pages, ex:
Topics: Energy, Immigration and Transportation
<dd class="keywords">
Topics: {%- for item in content.field_ct_category['#items'] -%}
{%- if loop.first -%}
<a href="{{ path('entity.taxonomy_term.canonical', {'taxonomy_term': item.entity.tid.value}) }}">{{- item.entity.name.value -}}</a>
{%- elseif loop.last -%}
Adding authentication to the Solr 6.x+ admin console on a standalone server.
I have a standalone Solr install on my Ubuntu box which powers a number of Drupal sites. Out of the box the Solr admin panel is unsecured giving attackers the ability to delete, corrupt, or empty out my indexes.
To do this, I need to find my $SOLR_HOME folder (you can find these in the variable dump at the bottom of your Solr admin dashboard ).
For me, with Solr 7.7.2, that is in the /var/solr/data folder. I then create a file called security.json with the following:
Getting DIVI 4.0.6 theme working on Pantheon with Wordpress 5.3
We recently updated an older site to Wordpress 5.3 and Divi theme 4.0.6, hosted on the Pantheon platform.
In doing so, we quickly found that we could no longer edit our pages as the Divi builder would not load. The error in the error logs was:
.../data/Utils.php:758 ET_Core_Data_Utils::WPFS():
[ERROR]: Unable to write to filesystem. Please ensure that the web server process has write access to the WordPress directory.
Programmatically get file URL from a media entity entity reference field in Drupal 8
Programmatically get file URL from a media entity reference field in Drupal 8
I have a content type with a media (image) entity reference field (field_thumbnail_image) and I want to grab its file URL. For this, I need to load the media entity, isolate its source object using getSource, then load this source as a file entity so I can make a proper URL.
// load the media entity from the media entity reference field$media_entity = Media::load($entity->field_thumbnail_image->target_id);
// get the file source value for the media entity$source_value = $media_entity->getSource()->getSourceFieldValue($media_entity);
We want to encourage front-end developers to use twig templates whenever possible as it makes long-term maintenance and update of the site a lot simpler for everyone involved if the code is easy to read like this:
However in the above simplified example, you can probably see that one of these is going to be readily available by default in Drupal (ex. show me the value of the first_name field from the logged in user) while the other may need to be handled in a custom module. For this example, we might be pulling the forecast from a separate site using a Guzzle REST call, parsing the result and returning it as a formatted result, not something we want to build out in Twig.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"summary": "Accomplished technical architect, problem solver, and leader with over 15 years experience in building and managing websites, ranging in scale from small citizen sector organizations to large federal agencies and Fortune 500 businesses. Recognized by colleagues as a strong communicator, able to translate complex technical topics for varying audiences as training documentation, technical plans, or business proposals. Highly skilled open-source, LAMP stack developer with expertise in Drupal and Wordpress but with a demonstrated ability to pickup new technologies quickly, deliver projects on short timeframes, and train colleagues.",