All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Finding a page in Drupal to edit?

I found a page on my site through a Google search. I can not find it in admim? I looked in the page's code and there is no node number for the page. In /admin/content/node I have looked at the pages ...
0
votes
0answers
4 views

Allow Order Item Type field to display on some products, but hidden on others?

I have two types of products on my website: Shippable Products and Non-Shippable Products. I have several Shipping Products set up. One of those Shippable Products needs a custom field to collect a ...
0
votes
0answers
10 views

How to list all Shipping Methods

I'm building a custom admin config form for a module I'm working on (for shipping estimate calculation). In it, the user must choose which Shipping Method (UPS, FedEx, etc.) will be associated with ...
-2
votes
0answers
9 views

How to create a token of the rendered entity of the author?

I created custom tokens for my custom module based on the Message module. Here is the file I added to my module : message_activity_stream.tokens.inc <?php /** * @file * Place holder for the ...
0
votes
0answers
7 views

Webform as checkout pane

We want to put a webform in a Commerce checkout pane. Webform allows to return a render array, as described in How to embed a Webform? $output['your_form_id'] = [ '#type' => 'webform', '#...
0
votes
0answers
8 views

How to add multiple “submit” buttons in Webform

If I add a button to a webform creating a module with something like this in it: $form['actions']['submit_2'] = array( '#type' => 'submit', '#value' => t('Submit 2'), ); It appears in my ...
0
votes
0answers
7 views

How to specifically define name and value attributes for checkboxes form element?

I am trying to build a form parallel to an existing 3rd party html newsletter form (from CleverReach). The final checkbox markup needs to look like this: <input name="1130400[]" value="lorem ipsum"...
0
votes
1answer
16 views

Select all nodes, where date is greater then current date and repeat event option is empty

I have content type "event". In this content type I have a date field, provided by the Date Recur module. At the result I have range of the dates: Event start and end date. Also Date Recur provides an ...
2
votes
3answers
17 views

Get node ID or URL in Twig on field level

I have a field value, which I would like to link to the content (to the node itself, using it in a teaser). How can I get the URL or at least the ID on field level, to create that link?
-2
votes
0answers
16 views

XSS problem and mod-security [on hold]

ive been got , i think . my hostings' mod-security has identified a problem> its all seemingly been fine so far for a couple of years Pattern match "(?:\b(?:(?:type\b\W?\b(?:text\b\W?\b(?:j(?:...
0
votes
0answers
11 views

Get title of referenced item two levels deep with Search API

I have three content types: A, B and C. A refers to B and B refers to C Now with use of the search api module I search my content types and I want to only output C. But in the result I want to show ...
0
votes
0answers
18 views

How to display fields in random order in a view

Hi I have a view that display mcqs (multiple choice questions). I want them in random order. I successfully sort the questions (one question in each node. I create a custom content type) randomly ...
0
votes
0answers
11 views

How can I list the previous published revisions of a node?

I have workbench moderation and revisions enabled on my content type. How can I list all previous published revisions of a node in views? I have created a node with revision 1 and published Then I ...
-3
votes
0answers
14 views

Skip entity validation on form [on hold]

I would like to not have the entity validation of the default password change form. When the form is validated, I just want to redirect the user without having the entity validation. Is it possible ...
0
votes
0answers
16 views

Why all emails are rerouted to one email address?

All emails are sent to Email_1(for exmaple only). Even when I try to use different email(for example Email_2) and execute "Send test email" in mysite/admin/config/system/smtp, the Email_1 receives ...
0
votes
0answers
15 views

Drush locale-update doesn't update locale [on hold]

I pushed an update to our live system and forgot to do composer install before running drush locale-update. Now, for whatever reason, it refuses to do anything when I re-run drush locale-update. It ...
0
votes
0answers
8 views

Warning: Attempt to modify property of non-object [on hold]

I have created a custom module for updating webform field data, but I am getting the error Warning: Attempt to modify property of non-object in gievances_webform_submission_presave() I am using ...
1
vote
1answer
22 views

How can I load a Store by user ID?

I am building a multi-seller commerce site, where a user can register and sell their product. I need to display a menu link if the user is anonymous to "become a seller", where they are directed to ...
0
votes
0answers
10 views

How do I include data from the order item type fields in the order receipt email?

I have created an "Event Registration" product type and order item type. In the order item type, I added fields for the registrant's name and job title. How can I print the submitted values for those ...
0
votes
1answer
14 views

Custom Views style plugin and template preprocessor

I have created a custom views style plugin and with a template preprocessor for a custom entity. The template preprocessor will render a list of items with no contents in the row. The Views format is ...
0
votes
0answers
3 views

Unable to install site when attempting to upload a Background Process module

We recently added a new module Background Process to our local drupal environment by running the command drush en background_process -y. After installing, I was able to use the method ...
2
votes
0answers
17 views

How do I access data nested within JSON in a Guzzle service description response model?

I'm trying to pull some data into Drupal from a service, via Guzzle. I've got several clients like this working, but the data returned by this service is structured a bit differently: { pager: [ ], ...
1
vote
1answer
27 views

Set parameter for internal or external traffic based on IP

We want to block external traffic in Google Tag Manager and I am trying to do something like shown here. I created this: /** * Implements hook_init(). */ function myfunction_init() { $...
-2
votes
1answer
24 views

Where can I add content? [on hold]

I have a customer with an old website that is using Drupal 6.22 The "Locations and Directions" page is currently set up where you enter the date for each location and they appear accordingly. What I'...
0
votes
0answers
15 views

wrong translation in admin/structure/views

I have a multi language site with Drupal 8.7.4 and default language is English. when i go to en/admin/structure/views i see list of views in English language. if i go to french interface via fr/admin/...
0
votes
0answers
10 views

Need help with error message

I’m new to drupal -- I'm trying to edit something on our home page but I’m getting an error message: "The specified passwords do not match. Please provide valid YouTube URL." It’s only happening on ...
1
vote
0answers
19 views

Define a default image when using image as base field in custom entity

I defined a custom entity type with an image base field. Now I want to have a default image which seems to be quite tricky: when I define a default image on a field api field and export the configs I ...
0
votes
0answers
7 views

How to set up webhooks and Send API for Facebook Messenger Platform

I'm trying to set up a facebook chat bot for users of mysite to check their own actity history. In either drupal 7 or drupal 8. On my site I have seperate pages created via views. so for example, I ...
1
vote
1answer
18 views

Display summary + read more links if body content is long, otherwise display body alone

We have a content type which has a customized template. In general, the body content of these nodes is short -- one to two sentences at most. In some cases, however, the body content is a paragraph ...
-2
votes
0answers
16 views

Changing Bootstrap 3 mobile menu breakpoints

I would like to change the width the mobile menu in the bootstrap theme appears instead of the desktop menu. I have my own subtheme created from the bootstrap base theme. Currently the mobile menu ...
-2
votes
0answers
20 views

Ban user from forum

I am using Drupal 7 Advanced forum module. I need the functionality to ban a specific user from forum for a certain amount of time. I need exactly what the 'Ban user' module does except that it ...
0
votes
0answers
16 views

megamenu mouse over dropdown not working on mobile devices

We are using megamenu to create a dropdown menu. For each sub menu there is a dropdown which appears on mouse over of the top level menu items. There is also a burger menu which replaces the main ...
-3
votes
0answers
18 views

how use several js in custom module [on hold]

In a custom module, I have 2 js files in a same library [...] js: js/rest_function.js: {} js/main.js: {} [...] Both are loaded : I see their functions in firefox debugging tab when an ...
0
votes
0answers
16 views

Show who published a revision/page - publish history [duplicate]

I would like to know which user published a page or revision of the page and when was it published. Is there something like publish history? In the image we can see only the revision (date and author ...
0
votes
0answers
16 views

Contextual filter to get node by URL alias

I am working with Drupal 8 Views REST APIs. I want to get a single node by alias URL using the contextural filter. by default drupal look for NID. By default, it's like this www.website.com/node/4 ...
0
votes
0answers
23 views

Unit test for successful install/uninstall of a module

Since I can't find any reliable information despite of heavy googling, I am wondering what's the best practice of testing a successful (error-less) install/uninstall of a module.
0
votes
1answer
14 views

How can alter the select options provided by Simple hierarchical select?

Simple hierarchical select is used to display Taxonomy as a select field in my existing content type. So I'm trying to alter the value of it. Even tried using hook_form_alter but didn't work. So is ...
-3
votes
0answers
10 views

Content Import With Reference

I succesfully import content without reference.. but i always fail to import with node, tax, user referenced... I tried and can import content without reference.. but the problem is i always fail to ...
-1
votes
0answers
17 views

Advagg module minify css & js but not aggregating or uglifying it

I am using advagg for minification, aggregation and uglifying css and js. All the files are getting minified, but no uglyfying and aggregation happened. The modules I enabled are AdvAgg Bundler ...
-3
votes
1answer
39 views

Create module that create Content Type [on hold]

I'm developing module that creates a content type. I saw the same question and there was a solution. I had tried it but it didn't work. job_post.info.yml name: Job Post description: A job posting ...
1
vote
0answers
18 views

How can I filter submissions for download?

I have a query about the webform download options. /admin/structure/webform/manage/{{webform_name}}/results/download In my webform there is a field dropdown with some data like 'a', 'b', 'c'... ...
-2
votes
0answers
22 views

Author of last revision not displayed [on hold]

I can see who has created revisions of the page, and which ones are not yet published, but I can't see who published the last version of the page. The task is to see the author name of the published ...
1
vote
1answer
93 views

Obtaining SUM('field') in PHP code

Can't figure out how to construct a query to obtain a sum of a field programmatically. The folowing code works fine for counts: $count = Drupal::entityQuery('node') ->condition('type', '...
0
votes
1answer
8 views

What is required for a view menu item to show up as a link in the admin page?

I'm creating several views that are to be used as reports. Since they all have a common topic, I'm grouping the views under a sub-path of admin/reports (e.g. admin/reports/data/needs_correction and ...
0
votes
0answers
9 views

Custom payment form for a custom payment method type [on hold]

I have a custom payment method and I want to had a custom payment form. The payment happens on site and I don't use credit card. I want something like a manual payment but with a payment form to ...
-1
votes
0answers
10 views

entity_metadata_wrapper not saving data consistently

When using the Entity Metadata Wrapper, I am getting inconsistent results when attempting to update data on the user object. I have a chunk of code that looks like this: global $user; $user_data = ...
1
vote
0answers
16 views

Incorrect User data being loaded after save

I am running into some data inconsistencies when attempting to load user data after saving the data. Basically, I have a callback that will update a field on the current user object. In a simplified ...
0
votes
1answer
27 views

How to un-cache a specific node field (also for anonymous)

My goal is to replace (by a custom markup) the render array of field_product when some conditions are met. (in a ecommerce site) Ex: If this is the weekend or if it is after 12pm the field_product ...
-2
votes
0answers
19 views

How do I create re-usable Paragraph items using Paragraphs Library?

An answer to a similar question says that we can use the Paragraphs Library sub-module to enable the re-use of paragraphs. But how exactly is this achieved? I cannot find any materials on how to use ...
0
votes
1answer
13 views

Display long text fields as type text input not as textarea on node forms

I have some fields which are configured as long text fields, which I need to display as <input type="text /> instead of <textarea></textarea>. I'm trying to find the correct naming ...

15 30 50 per page