Questions tagged [9]
Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.
1,754
questions
1
vote
2
answers
104
views
How can I display translated content by language?
I have a view with multiple displays, each configured as follows.
Display 1: Articles
FILTER CRITERIA:
Content: Published (= Yes)
Content: Content type (= Article)
PAGE SETTINGS:
Path: /articles/...
0
votes
1
answer
34
views
Override output of taxonomy name field
In drupal 9, the default output for a taxonomy term name field related to a specific piece of content is:
<element>"Item1, Item2, Item3"</element>
I want:
<element>Item1&...
2
votes
2
answers
79
views
How to show menu tab only for certain node type?
I have the following,
In the routing.yml
mymodule.cache_clear:
path: '/node/{node}/cache'
defaults:
_form: '\Drupal\mymodule\Form\APICacheClearForm'
_title: 'Cache Clear'
requirements:
...
-3
votes
1
answer
98
views
Permission denied error using Wkhtmltopdf on drupal 9 entityprint [closed]
I downloaded the Wkhtmltopdf library using Homebrew and configured it on drupal 9 on the entityprint module on /admin/config/content/entityprint. It is in the /usr/local/bin directory, but when I try ...
0
votes
1
answer
53
views
The title of a particular node became part of the breadcrumbs of administration pages
In the Claro theme, I have the System breadcrumb block in the Breadcrumb region. The breadcrumb shows Homepage > [Title for node 444] > Structure > [Administration page title] instead of ...
0
votes
0
answers
47
views
How can I programmatically set the options for a views exposed filter?
While it is possible to use hook_form_FORM_ID_alter() to programmatically set the options for any select input, with a views exposed filter there is the added complication of not knowing how Drupal ...
0
votes
1
answer
29
views
The hacked module report is not able to fetch the information of the enabled modules on the site
I am trying to use the Hacked module report for a site audit. However it has trouble fetching the data of the available modules on the site.
When tried using the drush commands of hacked module, I am ...
1
vote
0
answers
76
views
How to create a custom field/facet for Search API?
My Search API search page has a facet for Content Type, but I now want to add a custom entity in to the list of "content types" that users can filter on. I found some documentation on ...
0
votes
1
answer
49
views
A Drupal.behaviors stops working when I update the module
I have checked the field_ui core module to understand how to update my code, but it doesn't seems to work.
This is the code.
(function ($, Drupal, drupalSettings) {
Drupal.behaviors....
1
vote
0
answers
34
views
How to determine what values to set when preprocessing views exposed filter options?
When we set options for a views grouped filter using the views GUI, the select input's option values do not match the values we set in the GUI.
For example, if we use the GUI to set the Grouping 1 ...
0
votes
1
answer
32
views
Webform get email addresses from entity select unlimited
I have an Entity select element that references a role. The element is unlimited so multiple users can be selected at one time. I need to get each selected user's email address.
Using a computed twig ...
2
votes
0
answers
28
views
Display images in a Webform options (that displays a likert scale)
I'm looking for a way to display images in Webform options that I have created. The Webform options display a Likert scale with 4 options.
The machine name of the Webform option is '...
2
votes
0
answers
120
views
Need help understanding caching issue on Pantheon and Redis
On a Drupal 9.5 site on Pantehon that uses Redis, we have Drupal cache and the BigPipe module enabled.
The problem is that the cache is only being "hit" (?) if the same user visits a page ...
-3
votes
1
answer
103
views
"Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException"
I get this exception, which does not say which plugin causes it.
Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException
The "" entity type does not exist. at /var/...
1
vote
0
answers
9
views
How can I add the hero section image in the View to REST_API?
Hello im using Drupal 9.5.9 version. How can I add the hero section image in the View to REST_API?
I have created an api with Rest_API to fetch data from Views I have created. I have no problem ...
0
votes
0
answers
43
views
Webform composite sub-element altering : how to do?
👋
I'm currently developing a Webform based module (D9). One functionality I'm working on is around form "interdependency" : for a given form, some fields can be pre-filled from another ...
0
votes
1
answer
87
views
How to display taxonomy field value in paragraph twig file?
How to display role taxonomy field value in paragraph--user-category.html.twig file?
Field structure: field_role-> role taxonomy field.
I can print by {{ content.field_role | raw }} But I need to ...
0
votes
1
answer
97
views
Loading webform in modal is too slow
I have webform with near 130 fields (text, entity checkboxes, radios, composite, etc)
Use it in modal:
<a href="/my-form?title={{node.id}}" class="webform-dialog" data-dialog-...
0
votes
0
answers
50
views
Public Access to Private Files
I have a content type that allows one or more file attachments and these are set as Private so that access to them can be controlled. A small percentage of these files I also want to be publicly ...
1
vote
1
answer
51
views
Rest API show No route found for GET error
I'm using Drupal 9.5 to build my api inside my custom module.
When I test the API URL on the browser it show me a message
message: "No route found for "GET /api/v1/api_resource""
&...
0
votes
0
answers
18
views
Show field in a Views row as selected in the option for a custom Views Formatter
I have created a custom Views formatter to make an accordion. Each accordion item is a row. I added a custom field for the user to select which field would be used for the title of the accordion item.
...
0
votes
1
answer
49
views
Why doesn't the list of modules at /admin/modules show module versions? [duplicate]
I'm similarly investigating possible causes for /admin/reports/updates never showing any updates except for Drupal core and Zurb Foundation, nothing else is ever listed. composer outdated "drupal/...
-3
votes
1
answer
73
views
Modernizr - uncompressed JavaScript and CSS files warning in SEO [closed]
I'm using Drupal 9.5.9 version.
I have enabled Aggregation for css/js files under "admin/config/development/performance".
But, in page view source, I can see, core modernizr js file is not ...
-3
votes
2
answers
86
views
How can I embed PHP code in HTML?
I want to execute few curl commands from my Drupal site using PHP.
Idea is to create a custom content type that accepts php code. I understood from the internet I have to create a file "node--...
0
votes
1
answer
39
views
How to assign a paragraph to a node correctly?
I'm currently facing an issue while trying to link paragraphs to a content type in a newer version of Drupal. I have data from an older Drupal website that I need to migrate to a more updated Drupal ...
1
vote
1
answer
106
views
Override contrib module's template for an admin module
I need to override a contrib module's template for an admin module. For example, the webform_composite module has hook_theme() in its module file.
/**
* Implements hook_theme().
*/
function ...
-1
votes
1
answer
64
views
Using common database for multiple developers in local environment gets slow
When use the common database to develop in local environment for multiple developers in one Drupal 9 project is getting too slow. This issue occurs on Drupal sites only, others (Wordpress, Laravel, ...
1
vote
1
answer
107
views
Modal form opened from modal form doesn't submit
I have a user form mode (like node view mode except for forms) opened in a modal. When this form is submitted the user entity is updated and the modal is closed. This works fine. I now want to extend ...
0
votes
1
answer
46
views
How to place 2 blocks on same page which are based off page's rendered content?
To be honest, not sure of a good title for this. This is the issue:
I am using the TOC API to create a block. This API requires parsing the node content to determine the heading structure (H2s, H3s, ...
0
votes
1
answer
49
views
Webform Create node, send email when webform is submitted
I'm creating a node when a webform is submitted and adding the webform submission id to an int field on the node so the node is linked to the webform submission. I'm also sending an email when the ...
2
votes
1
answer
90
views
Disable core path based breadcrumb only for the frontend theme
I want to disable path based breadcrumbs if the current route is not a registered admin route. The front end of the site is driven entirely by Menu Breadcrumb, but in some cases the URL path is ...
0
votes
1
answer
66
views
Custom field type that has an array property won't save unless serialized, otherwise get "This value should be of the correct primitive type" error
I have a custom field type with two properties I am storing on it. One stores a string. The other I want to store an array. The array should be serialized in the field value table of the database, but ...
0
votes
2
answers
142
views
Changing order of execution of hook_preprocess_html
I have 2 custom modules in Drupal 9, let's called them module A and module B.
Each module has a fully working hook_preprocess_html function defined in the .module file. The hook_preprocess_html ...
1
vote
1
answer
89
views
The website encountered an unexpected error after the media module was uninstalled. The "media" entity type does not exist
This is a Drupal 9.5.10. After uninstalling the Media module. The website encountered an unexpected error. The error message only shows a little information, as I know. It mentioned the "media&...
-1
votes
1
answer
56
views
Custom module routing is going to page not found
I have a custom module that i'd like to display my webform on a certain page but it keeps sending me to a 'Page not found'.
folder structure is;
modules/custom/custom_webform_display
-...
0
votes
1
answer
149
views
How can I confirm a path is internal?
In my theme's theme file I'm using preprocess_node to create variables for a node based on the section of my site its in, and that's figured out by checking the path's alias.
So for example a path ...
0
votes
1
answer
23
views
Extract image meta data and set field values on Media upload
I'm extracting IPTC and EXIF data when the user uploads an image using the Media Library UI.
Using hook_form_alter I can get the URI of the uploaded file in the media_library_add_form_upload form, and ...
-1
votes
1
answer
102
views
Content type with 3 paragraphs fields: How can I output to different parts of page.html.twig?
I have a content type called (My Page) with 3 paragraph types, for a slider to display images, for text to display text, and for sidebar content. (The sidebar is a <div>, not a Drupal region/...
0
votes
0
answers
46
views
How do I display only the "View" tab for a specific webform and role?
I have multiple webforms, In each of these webform submission results page I require only view page, when a non admin user uses the site to see the results, they should only see the view tab and the ...
0
votes
0
answers
35
views
Inline Entity Form - is it possible to add field from child entity's taxonomy reference field
I have the below structure on my Drupal 9 site:
Product content type
-- field_product_integration (references contents of type Integration)
Integration content type
-- field_product_feature (...
0
votes
0
answers
27
views
Automation of publishing using Rules and Workflow
I am currently working on automating status changes in Drupal, my task is to use the Rules and Workflow modules to configure status changes after a certain period.
For better understanding, I'll give ...
0
votes
0
answers
105
views
Set form values based on ajax callback
I am creating a complexed multistep form based on data from an Excel document. The user can save parts of the form using AJAX save buttons and updated data from the Excel document are displayed in the ...
0
votes
1
answer
51
views
webform contact form gives access denied for anonymous users
I have a few webforms on my D9 site. They all work for anonymous site visitors except for the contact form, which gives an "access denied" error.
The permissions under the form's Settings-&...
1
vote
1
answer
172
views
How can I get the user UUID using the JSON API?
I tried the following JSON API query strings to get the UUID, but I keep getting a 404 error.
{url}/jsonapi/user/user?filter[uid][value]={uid}
{url}/jsonapi/user/user/{uid}
{url}/jsonapi/user/user?...
0
votes
1
answer
51
views
How to render the image or several images in the table render element?
I have a form. In the last step of the form, I display in the table what was saved in the fields in the previous steps.
Where there is a comment in the code, I need to render the all images from the $...
-1
votes
1
answer
31
views
disable the registration form
How can I remove the Registration tab in Drupal 9?
Previously, this was possible by changing the user settings.
0
votes
0
answers
59
views
Paragraph field in view relationship
Created a paragraph type with field named "related literature paragraph" as entity reference and inserted this paragraph type to a content type called landing page for a field named body ...
-2
votes
1
answer
37
views
Backup files very different size
for a Drupal website, backup is done via databack/mysql-backup (https://hub.docker.com/r/databack/mysql-backup) container.
Drupal version: 9.5.10.
The backup is created.
The created backup file is ...
0
votes
0
answers
28
views
Install module with required config that may exist
I have a module that have some config in config/install folder, that require config that may already exist in the current config. So I placed those config under config/optional.
But if those config ...
1
vote
1
answer
48
views
Email multiple addresses from a composite element in a webform
I need to email multiple addresses from a composite element in a webform. Using a Computed Twig element with this code:
{% for m in data.member_information %}
{{ m.email }}
{% endfor %}
The email ...