Questions tagged [8]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

0
votes
0answers
2 views

Fatal error: Class 'Archive_Tar' not found in ArchiveTar.php on line 8

Rather than re-explaining the whole process that got me here, I'm hoping I can just reference this question: Can't access specific admin pages In that question, I was hitting errors while trying ...
0
votes
0answers
7 views

Drupal 8 migration issue

I'm learning how to create migrations in D8. However, I have this annoying issue where my migration is listed when I execute drush migrate-status but the total and unprocessed values are shown as N/A, ...
0
votes
0answers
13 views

Migration with duplicate entry error

I'm running migration in Drupal 8, but got a duplicate error below. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10b1b105-355b-3c77-8880-a0c247f826f3' for key '...
0
votes
0answers
10 views

Composer version of archive-dump?

It appears that some things have changed with Drush. I have a project that is reactivated, and we did updates, but somewhere along the way that file is lost. Before solving some fatal error glitches, ...
1
vote
1answer
19 views

Can't access specific admin pages

I have a Drupal 8 site set up in Docksal. It was version 8.6.15, and needed updates to core and several modules. Bear with me - I don't have complete notes, because I thought everything had worked. I'...
-2
votes
1answer
19 views

Force one config to be imported before another?

Hitting an issue when installing a site from config and I think the order of operations may be the issue. Is there some way to ensure that one config is imported before another one? Edit: sorry, ...
-1
votes
0answers
14 views

cc is not working in hook_mail()

High priority requirement, please help. I have written some custom code for sending mail. Mail is working properly for 'To'. But for 'cc', mail is not working. I have set cc in $params also I am ...
0
votes
1answer
10 views

Aggregating JavaScript generates errors and breaks JS functionality

My website is working well but I was required to aggregate CSS/JS by enabling the system.performance.js.preprocess config key. Once the JS code is within one single file I got some errors that doesn't ...
0
votes
0answers
8 views

Instantiating an Entity: ConfigurablePluginInterface is deprecated

I'm migrating a D7 module that creates entities from a CSV file. I'm able to test this in drush core-cli by using: $event = \Drupal::entityTypeManager()->getStorage('node')->create(['title' =&...
0
votes
0answers
16 views

How do I redirect a user basing on its roles?

I'm having an issue with writing a redirect based on whether or not the current user's role matches the one listed or not I've been trying to find solutions related to getting the current path for ...
-1
votes
0answers
16 views

AJAX not working in views for anonymous users

I have a view in Drupal 8 with an exposed form with AJAX enabled. It works fine for admin user, but it doesn't for anonymous users. I have included in my theme libraries file: dependencies: - core/...
0
votes
1answer
14 views

Hide fields in Paragraphs conditionally using Form API #states

Because the Conditional Fields module doesn't work with paragraphs for Drupal 8, I've followed the instructions in Conditional Fields in Paragraphs Using the Javascript States API for Drupal 8 to hide ...
0
votes
1answer
14 views

Additional old_XXXXXXtaxonomy_term__field_XXX Tables after Upgrade to Drupal 8.7

After Upgrading from Drupal 8.6 to 8.7 I have tons of new (garbage?) tables in the database. The naming schema for the tables is old_XXXXXXtaxonomy_term__field_XXX Is there a drush command to remove ...
0
votes
0answers
11 views

Custom field validation condition not working

I have created a custom form validation. I am using webform module to build the form. in _achva_tz_validate function there are two fields that have the same validation. The second field, zug_id, is ...
1
vote
1answer
29 views

Is it possible to change the value of the field based on the the browser's language?

On my Drupal 8 website I have a content type "Video" which has an "Embed Code" field. Later the user is able to watch the video inside the platform. The value for this field usually looks like this: ...
0
votes
1answer
26 views

Vanilla Javascript Firing Twice

I have some simple dom manipulation I want to make using javascript without jquery. I can't seem to figure out how to prevent this code from firing twice. Almost all examples I find use jQuery, but I ...
0
votes
1answer
23 views

hook_form_alter() on a view exposed filter form

I am trying to add a disable attribute in a field using the hook_form_id_alter function. I created a module and built the function function disableIncentiveform_form_views_exposed_form_alter(&$...
0
votes
0answers
9 views

Email misses fields from form

This is regarding a Drupal 8 site, specifically Drupal 8.7.1 and the "Contact" module (with Contact Emails, Contact Storage enabled). The issue that I'm running into is some of the fields are not ...
0
votes
1answer
22 views

How to make a lock forget?

I understand how locks work, thanks to this post. Very straightforward: function mymodule_long_operation() { if (lock_acquire('mymodule_long_operation')) { // Do the long operation here. //...
0
votes
0answers
8 views

Add a FULLTEXT index on specific column

I'm currently implementing a custom search engine in my custom module. In order to optimize my module, I would like to perform SQL queries by using the syntax MATCH....AGAINST in Entity queries. By ...
0
votes
1answer
24 views

After save empty cache of referenced node

I have two content types. For clearer question I will work with the content types event and location. From my location content type I can reference to and event. Then on the event page I show the ...
-4
votes
1answer
25 views

How to have all options of some menu on the same line?

In the mayo theme I use for my site, I have a footer menu. By default, the options of this menu are displayed vertically: I'd like to have the options displayed horizontally. How can I do that?
0
votes
1answer
53 views

Get difference between two dates programatically

In summary: On a Drupal 8 project, i am trying to programatically get the difference between two different times (current time - Node creation time) Use case: I have "nodeabc" already available on ...
0
votes
0answers
16 views

Appointment scheduling module configuration and documentation [on hold]

I have installed the module successfully, but in fact i have discovering issues to configure the usage, I have an ENTITY/FIELD DEFINITIONS error even after i have updated entities from drush it shows ...
-2
votes
0answers
21 views

Store form data into custom table [on hold]

I have a multistep web form. I want to store webform form submitted data into a custom table. Where I have to write the code and in which file in Drupal 8.
0
votes
1answer
23 views

“public” not supported or disabled in libcurl error

I'm learning how to create a custom JSON migration and referring to the migrate_json_example module, I see the following code in migrate_plus.migration.product.yml. urls: - 'public://...
0
votes
1answer
26 views

Is there a built-in “None of the above” checkbox option in webform? and how to create one?

I may be mistaken but I recall seeing such option in webform somewhere before and I don't seem to find it now (in case I'm right). I have several questions with big lists of checkboxes and if there'...
0
votes
1answer
23 views

Target individual items of a multi-value field in my page template

I created one field for an image and In the field setting, I made allowed number of values to 2 (please find the attached screenshot ) So my question is, how can I add both the images in a different ...
0
votes
1answer
10 views

Rest Image upload always showing blank image

I am trying to post an image to the d8 server and it ends up always showing a blank image, but its uploaded, here is the sample code : this.httpClient.post('http://www.testdomain.com/file/upload/node/...
0
votes
0answers
17 views

Geolocation and view proximity filter - Can you default proximity to zero?

I'm trying to see if there is a way to default the views proximity filter to input zero for proximity values when the filter is empty, so we can sort the data using a different field by default. What ...
0
votes
1answer
16 views

Filter a view with contextual authored date

I have a Drupal 8 view where I want to sort nodes by authored year using contextual filters. So www.mysite.com/2017 will list all nodes from 2017. I set up the filter using 'Content: Created Year' ...
0
votes
1answer
47 views

How can I allow remote access to specific folders in my site? [duplicate]

I have a drupal 8 site that has a folder (/learning/sales) in it that is custom html/php/etc. In there I make an ajax call from one .html file to a .php file in another folder (from /learning/sales to ...
1
vote
1answer
33 views

Templates aren't called in custom module?

I am trying to add templates for the paragraph in the custom module. It invokes only the paragraph.html.twig. In theme suggestion, paragraph--example-ch-hero-panel.html.twig is given. I am using the ...
-2
votes
0answers
20 views

Make a catalog with view and taxonomy [on hold]

How can I build a catalog type view with taxonomy terms to access to my products?
0
votes
0answers
30 views

Get image style URI in JavaScript [on hold]

I am creating some custom Gutenberg blocks and that includes upload and selection of images from the file and media system. It would be best if I could load the correct image style in these blocks. ...
-5
votes
0answers
19 views

I'm trying to add headers:referer to cache context headers, but it doesn't work for anonymous users [on hold]

$header = $this->request->headers->get('referer'); if ($header === $this->request->getHost() || $header == NULL) { return AccessResult::allowed()->addCacheContexts(['headers:...
-1
votes
0answers
35 views

Image formatter doesn't use the path alias when linking to content [on hold]

I set up an image formatter for an image field admin/structure/types/manage/my_content_type/display/grid. In the image formatter settings, I checked Link to content. Unfortunately, the output link ...
0
votes
1answer
18 views

Custom CSS and JS that would load only for a content type's view mode

I am trying to load a custom css and js on my content type's view mode. Can this be achieved in drupal 8?
0
votes
0answers
11 views

Custom facet processor not displaying on facet setting

We have a custom module,mymodule, where we create a custom facet processor for a facet we created (myfacet). When we enable the module and cleared the cache we are not seeing the new processor display....
0
votes
0answers
8 views

What are all the methods/verbs supported by the Views REST export?

Drupal 8 provides functionality to create REST exports of content using the "Structure->Views" in Drupal admin interface. What are all the methods supported by these REST export? When I tried a "...
1
vote
1answer
21 views

What is the progress bar periodic update function return data?

In Drupal 7 from the function called with 'url/to/call/progressbar/update/function' (see below) you would return an array converted to JSON like this: drupal_json_output($message); I cannot find any ...
0
votes
0answers
6 views

Setting up Drupal commerce orders being sent to company erp system

I am new to Drupal and therefore bear with me. This might be a really simple question. Instead of using any of the payment functionality in drupal Commerce 2x i want the order to be sent to my ...
0
votes
2answers
23 views

How do you use hook_form_FORM_ID_alter() to alter the USER EDIT form?

I'm trying to mark fields on the /user/_uid_/edit screen as disabled. These are custom fields I've created in /admin/config/people/accounts/fields in D8. I have this code for another node entity type....
-2
votes
0answers
18 views

launch cron only for one task for 300 lines

My hoster told me to send only 300 mail by hours for avoiding spam. So I decided to create cron job to send emails, and the cron will start every hours. So I need to tell to the cron : On each run ...
0
votes
1answer
11 views

Skip a form step programmatically in simple_multistep module

I am trying to skip a step in multistep node form using Simple Multistep module. I have tried following snippet that works pretty good to skip one step. $skipStep = $form_state->get('...
-1
votes
1answer
13 views

Redirect domain to www, but on subdomain do not use www

I have a multilanguage website. The main language is English and the second language is Spanish. I need to have all the traffic using this domains: English domain: www.example.com Spanish domain: es....
0
votes
0answers
26 views

settings.php.lock error

I've been working on a Drupal 8 site for a month or so now and development has been progressing nicely until a week ago. It looks like the issues started at just about the same time that the website ...
0
votes
0answers
11 views

Invert facet setting for single option on search

What would be a good approach to invert a single facet option? Is this even possible by the system? This is what I have in mind: Let's say we have got a bunch of facet elements to select from on a ...
0
votes
1answer
31 views

Which files do I need to edit to alter webform #states with hook_form_alter?

I need to create #states conditions between either the fields in any one element in a webform or across other elements in the same form. I'd hoped I could do it via the WF yaml editor but it seems I ...
0
votes
2answers
24 views

Customize the title field

I want to display updated content's field with views block on the front page. 2019/06/20 newly posted content1-title 2019/06/19 updated content2-title The words updated and newly posted before the ...