Custom autocomplete form and autosubmit

Custom autocomplete form and autosubmit

I’ve added an autocomplete function for my views_exposed_form (a text input) using this tutorial and it works (https://www.linkedin.com/pulse/implementing-autocomplete-drupal-8-custom-callbacks-waliullah-khan). I’d like to add a “submit on... read more
How to add custom sort order to a taxonomy field list?

How to add custom sort order to a taxonomy field list?

I am trying to sort the list of content according to the weight order given to taxonomy term. Terminology used: content type : contact-person-details taxonomy : company vocabulary which has list of company names like company A, company B, … session company :... read more
Custom autocomplete form and autosubmit

How to determine if view has translations and which ones

I have a view $view = DrupalviewsViews::getView($view_id); How to determine if it has been translated into other available languages and which ones read more
Custom autocomplete form and autosubmit

webform libraries dir location

The webform status report states several libraries are needed. After downloading the zip file.. and extracting it. Where does ‘/libraries/’ directory belong? ie: /modules/webform/libraries Or ??? read more
Custom autocomplete form and autosubmit

How to open file in new tab instead of download when submitting form?

The code below downloads the current file, I need it to open the file in a new tab, what needs to be added in order to do so? public function submitForm(array &$form, FormStateInterface $form_state) { $filename =... read more
Custom autocomplete form and autosubmit

Author image in comments twig

I succesfully get user name, surname and date to render in comment.html.twig like this function MYTHEMENAME_preprocess_comment(&$variables) { $comment = $variables[‘comment’]; $variables[‘user_name_comment’] =... read more
Custom autocomplete form and autosubmit

How to get parent node values on inline entity form hook alter?

I am using inline entity forms to create a paragraph in a node form. When I add a node I want the title of the node form to be copied to the paragraph when I click on “Add paragraph”. I use hook_inline_entity_form_entity_form_alter to prefill the title... read more
Custom autocomplete form and autosubmit

Home Page rel="canonical"

We created a home page as node/1850 which is specified in /admin/config/system/site-information. When I look at the generated code, I see: <link rel=”canonical” href=”/node/1850″ /> This results in Google listing the url of the home page... read more
Custom autocomplete form and autosubmit

Do multi-level multi-value relationships work in a view?

In Drupal 8, I have a content type Story, with a multi-value entity reference to content type Project, which, in turn, has a multi-value reference to Team-Member, which has a single-value reference to Person. In my story node, I want to show a list of projects, and... read more
Custom autocomplete form and autosubmit

Access denied for all users, sessions table empty, access log shows NULL uid

My Drupal 7 site has been up and running for a couple years without issue. I went to log in as admin today to check for security updates and had the following experience: When I first browse to the page (as anonymous), the site works fine. Enter login information to... read more
Custom autocomplete form and autosubmit

composer install error

I can’t install anything because of this error: [RuntimeException] Could not scan for classes inside “/app/vendor/symfony/serializer/src/” which does not appear to be a file nor a folder and subsequently: Could not scan for classes inside... read more
#States required not working

#States required not working

I’m trying to use “#states”. When my checkbox is true, I want to make “required” another field. Drupal prints the “required” asterisk but not correctly. Here it’s the code: // Return origin.... read more
Custom autocomplete form and autosubmit

How do I disable/enable the Advanced Content Filtering (ACF) in CKEditor 4.8.0?

Please tolerate me for asking such a question. All the answers I found are for Drupal 7. There is barely any talk on this issue for Drupal 8. I am a beginner in Drupal and I am not a programming oriented person. However, I am determined to find the solution to make... read more
Custom autocomplete form and autosubmit

Pass data to hook_preprocess_html from custom module

I’m trying to create a custom Drupal 7 module where it renders a custom page template. I want the data on /animals and /animals/getanimal to be in a custom HTML template. After much searching and few successes, I’ve found that hook_preprocess_html works... read more
Custom autocomplete form and autosubmit

query to retrieve all translations and nodes of a language that has been removed from the system?

I am experiencing an issue after a language has been removed from the system. Every time I go on the admin/content page on a drupal 8 site I get: Error: Call to a member function getId() on null in DrupalCoreEntityEntityEntityViewDisplay->buildMultiple() (line 254... read more
Custom autocomplete form and autosubmit

How to get attachments out of a twig file

How do I get the attachments out a twig file and add them to a build array? If there is a twig file with {{ attach_library(‘mytheme/pullquote’) }} And because it’s in an ajax response, I need to get the attachments out without rendering the page, how... read more
Custom autocomplete form and autosubmit

Alter the user registration form

I’m trying to change the label and field instructions for the name field on the User Account Creation form. I’m new to coding, and thought this would be an easy task. My custom module is enabled and I’ve cleared caches, but none of my changes show... read more
Custom autocomplete form and autosubmit

How to make existing public files private?

Let’s say I have a node type “Article” which has a field “File” which is set to handle public files. A lot of articles and files get added. Now the specs suddenly change and the “Article” will move behind a login and therefore... read more
Custom autocomplete form and autosubmit

Invalidating render cache items for anonymous?

We have a certain content type in Drupal 8 that has a small grid of data on it that is populated from an API call when the node view is being built. In that call, I am checking for cache and setting cache instead of talk to the API every request: if ($cache =... read more