Juampy NR
  • Member for 10 years
  • Last seen more than a month ago
How to add custom metatags in drupal 7?
12 votes

Metatag does support custom tags by implementing hook_metatag_metatags_view_alter(). See the following hook implementation to add the Open Graph video:duration metatag from a custom entity: /** * ...

View answer
Installation error with Composer
7 votes

For Ubuntu 16.04 I had to run the following commands to adjust the PHP version used by Apache: sudo a2dismod php7.0 sudo a2enmod php7.2 sudo service apache2 restart

View answer
Unable to delete feature content type after uninstalling feature
3 votes

The above method does not delete taxonomies, but this can be achieved by appending the following after disabling and uninstalling the module: // Delete taxonomies. $machine_names = array('taxonomy_a',...

View answer
How to finally disable comments on content type?
3 votes

None of the above solutions worked for me. The comment form is still displayed in existing nodes unless you update node_revision as well. Here is the hook_update_N() implementation that worked for me:...

View answer
Debugging JavaScript tests
2 votes

I think that you are looking for JavascriptTestBase::createScreenshot() https://api.drupal.org/api/drupal/core!tests!Drupal!FunctionalJavascriptTests!JavascriptTestBase.php/function/JavascriptTestBase%...

View answer
How can I safely move a module to another folder?
1 votes

Drupal stores a cached version of the container at the cache_container table. This table contains, among other things, the list of module paths. For most cases running drush cr should be enough but if ...

View answer
How to make a callback funciton to a drupal behaviors funtion
Accepted answer
1 votes

You could assign mySwiper to a property within the behavior. (function ($) { Drupal.behaviors.modulenameSwiper = { attach : function (context, settings) { if ( location.pathname != '/en/...

View answer
Can I have multiple nested forms within the same fieldset?
1 votes

You can acccomplish that by calling drupal_render() and passing it the fieldset and its children. The twitter module does this for the Drupal 6 version. See the following usage example: $add_account ...

View answer
How to programmatically import a feed?
0 votes

This should work: $feed = \Drupal::entityTypeManager()->getStorage('feeds_feed')->create(array( 'type' => 'my_feed', 'uuid' => \Drupal::service('uuid')->generate(...

View answer
After moving a module to another folder , i cannot clear reminiscent module paths
0 votes

Drupal stores a cached version of the container at the cache_container table. This table contains, among other things, the list of module paths. For most cases running drush cr should be enough but if ...

View answer
Pass positional arguments to drush via drushrc.php?
0 votes

This shell alias works for me. This means that you can define a shell alias that sets default parameters (and options if you want) for an existing command: $options['shell-aliases']['site-install'] = ...

View answer
How I can delete all node/field revisions?
0 votes

Node Revision Delete module now has a stable release. The Node Revision Delete module lets you to track and prune old revisions of content types. Features: Define the max amount of ...

View answer