Adding block in view tabs

Adding block in view tabs

I have tabs created using views and has contextual filter of group parent(Group ID from URL). I created a block that has a contextual filter of GID. In the block layout, I placed the block in the content region, select Group from URL to Group ID: and specify path to... read more
Cannot format date for date field in a Views_Database_Connector view

Cannot format date for date field in a Views_Database_Connector view

I am using the Views Database Connector module in drupal 8 to display the data from an external mssql database. I am running into issues with the date field. When I am asked to configure this field in the view, I am asked to choose a format for the date. However, when... read more
Cannot format date for date field in a Views_Database_Connector view

Get text_long field value with EntityMetadataWrapper

I am trying to get data from a text_long type field using EntityMetadataWrapper, and from what I’m seeing on the interwebs, I should be using something like this: $wrapper->{$field}->value(); or $wrapper->{$field}->value->value(); However, if I... read more
Cannot format date for date field in a Views_Database_Connector view

BrowserTest on a multisite gives an error

My sites directory looks like this: default, site1, site2, site3. The default directory is empty. I want to run tests against my site1 database. So I have put its details in phpunit.xml Here is my phpunit.xml set up. <php> <!– Set error reporting to... read more
Cannot format date for date field in a Views_Database_Connector view

Default user image in user account menu!

I am trying to add a default image to render in the user account menu when the user does not have an image. CODE: function nestle_preprocess_menu(&$variables) { if($variables[‘menu_name’] == “account”) { $user =... read more
Cannot format date for date field in a Views_Database_Connector view

Replace pages with static HTML pages

I have a drupal 7 driven website. I need to replace a handful of pages on that website using static HTML without impacting the URLs of those pages. For example I have a page accessible at: example.com/services/ That page is a proper drupal driven page. I want that... read more
Cannot format date for date field in a Views_Database_Connector view

Disabling Twig cache does not prevent Drupal from caching

I have the following content in menu.html.twig template. <ul> <li><a href=”/”>Blog</a></li> <li><a href=”/photos”>Bilder</a></li> <li><a... read more
Cannot format date for date field in a Views_Database_Connector view

How do I set a field value?

I am using the following code, but it doesn’t set the field value as I would expect. use DrupalCoreEntityEntityInterface; /** * Implements hook_ENTITY_TYPE_update(). */ function mymodule_node_update(EntityInterface $entity) { if ($entity->getType() ==... read more
Cannot format date for date field in a Views_Database_Connector view

Should I ignore the "vendor" directory?

I’m finally trying to get on board with using Drupal 8 and want to know if I should ignore the vendor directory in git with .gitignore. I would assume not, but I’ve seen a few example .gitignore files that do. Thanks! read more
How do I enable a REST resource for a custom content type?

How do I enable a REST resource for a custom content type?

I’ve created a bunch of custom content types like “Car Makes” and “Car Models”, but I can’t seem to figure out how to enable a REST resource for them. In my REST settings page, I see the default content, content type, user, user... read more
Creating paragraph entities and adding to a node

Creating paragraph entities and adding to a node

I am using the Paragraph module in and I need to programmatically create paragraph entities and attach them to nodes. Using the following code in a for-loop: $paragraph = new ParagraphsItemEntity(array(‘field_name’ => ‘field_page_body’,... read more
Cannot format date for date field in a Views_Database_Connector view

How can I filter an index view using REST?

I have a custom content type called ‘Regions’, which simply has a title field. Example values are: Asia, North America, Ocenia, etc. I’ve set up a view for this list and a REST export for it, so /regions gives me a simple list:... read more
Cannot format date for date field in a Views_Database_Connector view

security kit module settings are blocking own site jQuery calls

I am using Security kit module to enhance security for my website. In that I have enabled Enable JavaScript + CSS + Noscript protection option. This setting is blocking one of Jquery call that is .load functionality. The description of this option is here: Enable... read more
Cannot format date for date field in a Views_Database_Connector view

Concatenate two fieds in an EntityQuery condition

I’m trying to query some nodes by a given string checking if the string is either in the node title OR if the string is an exact match of concatenating the value of two strings. I know this should be possible in normal mysql but not sure it can be translated in... read more
Cannot format date for date field in a Views_Database_Connector view

Stemmer processor not working

I have configured Search api module in my Drupal 8 search. This is the first time I am configuring search api. I am using database search and not solr. My problem is stemmer processor is not working properly. I am not getting intended result for keywords due to... read more
Cannot format date for date field in a Views_Database_Connector view

User can’t access own private files via Views

I’ve set up a private directory sites/default/files/private and use it for a file field. As an admin, everything works as expected when uploading and viewing a private file. As a user who uploads a private file, I can only download own private files with the... read more
Cannot format date for date field in a Views_Database_Connector view

Print image with alt text

In the node template, I print an image gallery. I need to add the alt text. <div class=”field–name-field_gallery”> {{ content.field_gallery }} {{ content.field_gallery.alt_field }} </div> There are many images, which are printed, but the... read more
Cannot format date for date field in a Views_Database_Connector view

Migrate multiselect taxonomy values from node with csv

I want to import companies with csv into Drupal 8 with migrate_source_csv module. CSV: company_name,company_categories,company_size “Dummy Name”,”Category 1″;”Category 2″,”2 people” How to accomplish? Do I need an other... read more
Cannot format date for date field in a Views_Database_Connector view

How do I use the Password Policy module?

I just installed and configured the Password Policy module, but the constraints like password length should be minimum 8 characters is not reflecting when an administrator user adds a new user and creates an one time login password. The constraints/plugins provided in... read more
Cannot format date for date field in a Views_Database_Connector view

User authentication handled by a web service

I seek your help and advice. By default, Drupal manages user authentification using the user module that resides in the “core/modules” and through the main Drupal Database. In my case, the user is authenticated through an external webservice, the process... read more