REST API 401 Unauthorized

REST API 401 Unauthorized

I am trying to create a new node with POST through REST in D8. I have enabled the relevant modules (hal, serialization, http basic authentication, Rest web services, rest ui) and added the required permissions to users (create content). I configured the services with... read more
REST API 401 Unauthorized

Install multiple apps on a Bitnami stack

I am currently transitioning from my Ubuntu 16..04 LAMP Server to a Bitnami 7.59 Drupalstack. However, I discovered that Bitnami does NOT provide instructions / FAQ on how to install multiple Drupal apps onto a single Bitnami Drupalstack, while... read more
REST API 401 Unauthorized

"User warning: The following theme is missing from the file system: media in drupal_get_filename()"

What does this error message mean? How can I fix it? User warning: The following theme is missing from the file system: media in drupal_get_filename() (line 268 of core/includes/bootstrap.inc). drupal_get_filename(‘theme’, ‘media’) (Line: 291)... read more
REST API 401 Unauthorized

Field revision_default must be updated

After installing 8.4, updated step by step to 8.5.3, now I have in Status Report the following error: Field revision_default must be updated at several entity types, Node, Media, etc. Checking the database, I have that field in the tables *_field_data and... read more
REST API 401 Unauthorized

How and where should I override the character length of the description field for an exposed filter

I’ve got an exposed filter with labels and descriptions in my Views. My design requires that the descriptions be displayed as tooltips on hover. In addition, I want this to be the general rule for all my exposed filters in all my views, so the fields that are... read more
REST API 401 Unauthorized

How do I get a list of bundles?

In Drupal 8+, how do I programmatically get a list of bundles for an entity type, for example the list of content types. Specifically, I’m looking for the machine names. read more
REST API 401 Unauthorized

Specify the view mode when the node is displayed on modal window (ajax)

Is possible to specify the view mode using the default modal Ajax functionality? I’m using this and it works, but I need to theme the node in a different way inside the modal <a class=”use-ajax” data-dialog-type=”modal”... read more
REST API 401 Unauthorized

How do I remove /web from the URL?

I have a site using Drupal 8.5 I installed with Composer. When users want to visit the site, they’d normally need to add /web after the domain to access it. I have a cpanel redirect that redirects users from domain abc.com to abc.com/web, so they don’t... read more
REST API 401 Unauthorized

Migration fails to copy any node

I am trying to migrate a measily 200nodes from a Drupal 6 site to the latest Drupal 8. The web based Migrate seems to be partially working in that I have the users migrated, content types, but none of the content/nodes did. I get these errors. Operation on Node... read more
REST API 401 Unauthorized

How do I modify a custom entity delete form?

I have a custom entity (Possession) which has a non-standard edit form. The route for the edit form is the following. entity.possession.edit: path: ‘/individual/{individual}/possession/{possession}/edit’ defaults: _entity_form:... read more
REST API 401 Unauthorized

Select DISTINCT on a particular field

I want to return distinct values based on a particular column – ‘company_code’. How do I achieve this? My code is as below. $query = Drupal::database()->select(‘actuarial_bases’, ‘bases’) ->fields(‘bases’,... read more
Trusted Host Patterns Settings Not working with IP

Trusted Host Patterns Settings Not working with IP

So I am trying to get this drupal(drupal845.localhost) site accessible by my VM. But the Trusted Host Settings are not working. Here are the settings in my settings.php $settings[‘trusted_host_patterns’] = array( ‘^drupal845.localhost$’... read more
REST API 401 Unauthorized

How to change search placeholder?

So far I have tried this code in mytheme.theme: function mytheme_form_search_block_form_alter(&$form, DrupalCoreFormFormStateInterface $form_state, $form_id) { $form[‘keys’][‘#attributes’][‘placeholder’] = t(‘Custom... read more
REST API 401 Unauthorized

How can I check, if node has a new (unpublished) revision in node-template?

I have user created content. I use the content-moderation plugin, so user can update their nodes but the updates will only be published after moderation. I like to display a little batch (has new unpublished update) on the user-nodes, to give the user an information... read more
REST API 401 Unauthorized

How to fix missing php extensions problems in custom Docker image?

There are many excellent questions here about automating the initial setup process for Drupal but I haven’t seen any pertaining specifically to Drupal containers in Docker. Here’s my setup. I’ve kept the images/builds as vanilla as possible; the only... read more
REST API 401 Unauthorized

Migrate Paragraphs from CSV

I am migrating Paragraphs from CSV file. I have Paragraph called Text with two fields -> title and body. The problem is that I would like to also migrate translations for them, which currently don’t know how to achieve. Tried with the migration_lookup plugin... read more
REST API 401 Unauthorized

Inline Validation Messages with Webform

Sorry if this has been asked before (although I’ve been looking and haven’t found quite what I’m looking for). It’s not currently possible to present the server-side validated messages (specifically required fields) inline on forms built with... read more
REST API 401 Unauthorized

How do I get total webform submission count of multiple webforms?

I am able to get the webform submission count total for single webforms, but when I filter for multiple webforms (using the OR operator) it only shows the total count for 1 of the webforms. How can I have Views add the counts for all of the webforms I filter? read more
REST API 401 Unauthorized

How do you override custom blockAccess() methods for blocks added with Page Manager?

I’ve created a custom block with all its methods like blockAccess() etc. I would like to override one of those in another module. In my project I have used Page Manager, means I think I can’t call hook_block_access() because blocks added with Page Manager... read more
REST API 401 Unauthorized

How should I get the user submitted input?

On an submission handler, should I fetch the user input via Drupal::request()->request->get() or is $form_state->getValues(); the better (more saver) way? read more