Categories
CMS Drupal Mastering Development

Why doesnt my migration plugin run?

I made a plugin to add the alias to my node migration, using the instructions here https://www.calebthorne.com/blog/drupal/2016/07/16/drupal-8-migrate-pathauto but i tried to put a drush break point and it never runs . How do i get this plugin to run during the migration? this is the plugin code below . and the yml is as follows: […]

Categories
CMS Mastering Development

How to add target to link within field instructions?

I don’t see anything in the documentation about how flexible the instructions fields are, as they use Markdown syntax. It’s not clear how to add a target to a link, for example.

Categories
CMS Mastering Development Wordpress

WordPress Ajax POST Error 403 admin-ajax.php

I have trouble to get my Ajax Call working when changing a <select> option. I get 403 Errors JS: function sendAjax() { console.log(‘function launched’); jQuery.ajax({ type: "POST", // use $_POST request to submit data url: john_cena_ajax_data.url, // URL to "wp-admin/admin-ajax.php" data: { action: ‘john_cena’, // wp_ajax_*, wp_ajax_nopriv_* nonce_ajax: john_cena_ajax_data.nonce, nonce_data: jQuery(‘#john-cena’).data(‘nonce’), first_name: ‘John’, // PHP: […]

Categories
CMS Mastering Development Wordpress

How do you find a file in the media library using the file URL?

We have about 2000 files in our media library and we are working on an audit to organize the files and create a name hierarchy. But until that is done, I am trying to locate a handful of specific files to replace. I don’t know what the files are named in WordPress, I only have […]

Categories
CMS Mastering Development Wordpress

Caching issue for the mini cart count

I have developed a woocommerce theme. I also use a caching plugins (Autoptimize + WP Fastest Cache). On my header I have a cart icon which displays how much items are in the cart. But this is not working very well with the caching plugins. If I open the homepage, then to the shop page […]

Categories
CMS Drupal Mastering Development

How do I create a merge request for a project?

I’d like to create a merge request for a project. I found a page on drupal.org titled Issue forks & merge requests which seems to address this but I’m not really getting anywhere. The page says: On an issue page, make sure the fork is created and you have access. If the fork has not […]

Categories
CMS Mastering Development Wordpress

Caching issue for the mini cart count

I have developed a woocommerce theme. I also use a caching plugins (Autoptimize + WP Fastest Cache). On my header I have a cart icon which displays how much items are in the cart. But this is not working very well with the caching plugins. If I open the homepage, then to the shop page […]

Categories
CMS Drupal Mastering Development

How to show node image field in default search results (Drupal 8)

How to render node image field in default search results (Drupal 8). What i have tried so far: function mag_api_node_search_result(\Drupal\node\NodeInterface $node ,$hellotest = NULL) { //$image = $node->get(‘field_issue_image’)->getValue(); $imageUrl = $node->get(‘field_issue_image’)->entity->uri->value; $url = \Drupal\image\Entity\ImageStyle::load(‘medium’)->buildUrl($imageUrl); $hellotest[‘test’] = $url; } After that in search-result.html.twig trying to render this variable but $hellotest[‘test’] doesn’t renders in twig. <h3> <a […]

Categories
CMS Drupal Mastering Development

How can I make views exposed filter case-sensitive?

When I use the exposed filter, if I search for "IMAG" all results showing image show up. Is there a way to have the exposed filter search case sensitive? UPDATE I added a screenshot to explain more. I have tried the operators: is equal to, contains, contains any word, contains all words, and regex. Neither […]

Categories
CMS Mastering Development Wordpress

Caching issue for the mini cart count

I have developed a woocommerce theme. I also use a caching plugins (Autoptimize + WP Fastest Cache). On my header I have a cart icon which displays how much items are in the cart. But this is not working very well with the caching plugins. If I open the homepage, then to the shop page […]