All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
476 views

Computed field that displays the full username of the author

I am using a computed field and I want to display the field_first_name and field_last_name, which are properties of the user that created that node. I have been trying things, but it seems like $...
3
votes
1answer
900 views

thumbnail images not loading

I am using drupal 8, and have just moved my site to shared hosting. When I upload a standard image field on my shared hosting environment, the thumbnail image does not show up. This works perfectly on ...
1
vote
0answers
58 views

What is the design pattern for plugins (and their managers) called?

I am trying to figure out how to design (and subsequently implement) as plugin-like solution in Symfony. I found this article https://drupalize.me/tutorial/what-are-plugins?p=2766 that says: Plugins ...
0
votes
2answers
445 views

Modal/dialog box

This sound like a really dumb question, but for the life of me I cannot find something that works. I want to trigger a modal/dialog box for some basic content. Its just HTML, not the login page or ...
3
votes
3answers
2k views

Set a datetime field configured as date-only

I'm developing a module where I have to set a user profile date_field. I tried several methods to implement this but not one worked for me. This is the code I am using. private function updateUser($...
1
vote
1answer
635 views

How do I attach an existing file to a node?

Here's my problem. I have a D6 site which has been in production for a number of years, and in consequence has used various methods (and modules) for displaying images within body text of book pages. ...
1
vote
1answer
471 views

List nodes of children using taxonomy_select_nodes

I want to list nodes from children terms using or editing taxonomy_select_nodes function. Actually I added these few lines but I get an infinite loop or slow response: function ...
1
vote
1answer
413 views

URL aliases and Entity Translation (menu name replacement pattern)

I am using entity translation (Field translation) for my nodes, and set the menu name on each 'page'. The menu itself is arrange to basically have a duplicate tree in the same menu each with a ...
1
vote
2answers
572 views

How do I create and render a custom region?

How do I create and render a custom region in Drupal 7, when the Display Suite module is used? I am not able to show/display a block into a custom region and confused with the files structure. Please ...
0
votes
2answers
528 views

Extract First Name and Last Name from the Title field in Drupal 7

In one of my content type, we are storing names in the Title field. Due to the recent requirement change we now need to sort results by last name. But since the name is stored in Title how can I ...
1
vote
2answers
459 views

How do I use print to generate a PDF of all entities referencing a specific node?

I'm trying to use the Print module to generate pdf's and epubs of the stories on my site. However, I need to get Print to generate these files from the story page and then generate the pdf with ALL ...
0
votes
1answer
411 views

Send data with post to other drupal page not working

I'm trying to send data from a html form to another drupal page. The Form (in JavaScript): var data = { // JS Object with data to send priceUnit: '131.97', priceTotal: '131....
0
votes
1answer
454 views

hook_form_alter #attributes and #disabled

I'm using Drupal 7 and Advanced forum. The users when will create a new topic will be able to select the forum container and forums, but if they select a container, an error will be showed. I want ...
0
votes
0answers
10 views

Entity where member variable is different type than when serialized

Not entirely sure how to phrase this. I've got a config entity that needs to store a block id. In my config I have the mapping set to a string for the id. When I load the entity, I'd think it would be ...
0
votes
2answers
454 views

how to create custom search filter using view in drupal 7?

I am using ubercart module in site. I need to create search filter,that will be search product sku,title and description etc.
1
vote
1answer
516 views

block view is not displaying

This problem starts with the subtheme. I am using drupal 7 with a subtheme based on omega 3.1. For some reason node title and admin tabs are displaying only on the home page and two basic pages, ...
0
votes
1answer
461 views

Theming paragraph fields from entity reference in view

I have a view (Drupal 8) where I load my entity reference field (display hidden), with three fields from a Paragraph type and a certain custom display). The HTML markup looks like this now: <div ...
0
votes
1answer
467 views

How the get all the child menu's Node IDs?

I've a very simple task to do in Drupal 8, but I've hard time to find the proper way to do that. I have a simple menu like this (all basic pages). Company Organization Values Terms Services Team ...
0
votes
1answer
20 views

Unable to add patches via composer when we run “composer install” or “composer update”

I am facing an issue wherein I have added a single patch in my composer.json under "extras" "patches": { "drupal/field_validation": { "...
0
votes
1answer
455 views

Alter Registration Form Text

I am trying to alter the email description text on my user registration page. I have added the following to the bottom of my template.php file but nothing is happening. It seems like the function isn'...
1
vote
1answer
787 views

How can I disable image resizing in CKEditor?

Our site is responsive and when editors use the resizing handles after uploading an image into the editor, it puts in fixed width and height on the image. We don't want them resizing images at all, ...
1
vote
2answers
586 views

Override breadcrumbs is not present?

In Drupal 7, in the views with an argument, is easy to override both title and breadcrumbs. Now in Drupal 8 I can't find the option. Did I miss something? or isn't possible? In this case what is ...
0
votes
1answer
30 views

Tokens missing in Webform Emails after upgrading

Currently running Drupal 7.69 / PHP 7.3 (+ CiviCRM) I have recently updated some Modules : Webform, Views Bulk Operations, i18n, and Content Access. Since then, my Webform Emails do not show the ...
0
votes
1answer
577 views

limit the number of nodes per User

I'd like to limit the number of nodes that an authenticated user can create. For example users can not create more than One post for specific Content Type. I am wondering how can I do so? Thanks..
0
votes
1answer
33 views

Forena Reports, does not appear in the Drupal menu Structure

I installed the downloaded the 8.x-1.x-dev version of the Forena module, and it installs correctly. When I go to the menu Structure to start creating the report, the Forena Reports link doesn't appear....
3
votes
1answer
475 views

how to optimize inline images in ck-editor

Is it possible to optimize inline images uploaded via ck-editor. There is an image with size 11 MB and in default behavior its rendered original without any optimization applied to it.
0
votes
1answer
21 views

Form Redirect before submit?

I have a form which has 2 values prefilled (values come from a few steps the user has to take to be given the chance to get to the form I'm talking about). My question is, how do I redirect the user ...
1
vote
0answers
17 views

Local action on node but path a child of node?

I have created two local actions which I want to display on my nodes, General Configuration and Advanced Configuration. General Configuration will show at node/%node, but Advanced Configuration is ...
-1
votes
0answers
22 views

comment form not display

In D8, I create sub theme of Classy. In content type xyz create a field comment of comments field type. And create a node of type xyz, but when view node, comment form not display. see only "Add ...
1
vote
1answer
444 views

Pulling capacity and slots left from entity registration

I'd like to pull the values for capacity and the slots left from a registration created by the entity registration module. This sets up registration entities which are attached to (I believe this is ...
0
votes
0answers
17 views

I’m trying to create a link to a user user/%user/stores on a commerce marketplace and open social

I’m using commerce marketplace and open social, I need to create a link to the user products and my store. But somehow I’m not able to get it running. I keep getting access denied when using "...
1
vote
1answer
17 views

Adding a suffix to a form element

I have a form which has an input field for which i want to add a suffix. function myapp_preprocess_form_element(&$variables) { if ($variables["element"]["#attributes"]["...
4
votes
1answer
410 views

“Page not found” on translated page

I’m setting up a dual language site (English default / Chinese, Simplified) where Taxonomy translation mode is “Localize”. I modified the Taxonomy term in Views. I get results with preview in both ...
0
votes
1answer
29 views

Confused about Entity bundles

I'm trying to convert a Drupal 7 site to Drupal 9 before D7 reaches EOL, and I had a custom module that had a lot of custom tables defined in Hook Schema, that would be joined together in different ...
1
vote
1answer
520 views

Installing a New Site with Drush and Ansible

I'm trying to create an Ansible Role to run on a VM that creates a new site (so my colleagues don't have to memorize the drush si --db-url command and automate the entire process. I'm running into a ...
0
votes
2answers
385 views

How do I autopopulate fields in Drupal 8?

How do I autopopulate fields in a node form in drupal 8? Basically, what I'm trying to do is create an ajax callback to autopopulate fields based on a call to a 3rd party service. So I'm using ...
0
votes
0answers
24 views

Redirect to suggestion with search api autocomplete

I'm using search api and search api autocomplete. I want that when a user clicks on a suggestion (search api autocomplete), he will be redirected to that suggestion, not the search results. For ...
0
votes
1answer
441 views

Drupalgap exposed filter for data and select field

I spent all weekend trying to make this work, and couldn't figure it out. How do I create a views exposed filter for date and a text list on a given node? My setup - I have a view that is exposed as ...
1
vote
1answer
302 views

Migrating revisions from external data source

We are trying to migrate content from an external data source into Drupal 8 using the core migrate modules. This is a stripped down example of the data being migrated: id resourceId articleId ...
0
votes
1answer
505 views

Customise Webform Email Submission Data

In the webform-mail.tpl.php template, it outputs the main form data using: [submission:values] I am using the html format (using mime-mail) and this outputs to the email html in the form: <div&...
0
votes
0answers
25 views

How do I convert the text value of the node:field_frequency to the ISO-8601 (Biennial -> R/P2Y) in DKAN 1.14?

I have Dkan 1.14 distribution installed on Drupal 7.67. Also catalog file generation (catalog.xml) is configured for harvesting. When setting up data mapping between Drupal and Open Data entities ...
86
votes
7answers
16k views

When is it appropriate to create an Entity versus just adding a new content type?

What is the benefit to creating new entity types over just building a new content type? It seems a bit overkill to do all of the custom coding that is required to create a new entity when you have ...
-1
votes
1answer
44 views

The “dictionary_term” entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition()

I followed How to create a custom entity in Drupal 8 to create a module. When I installed it, I got the following error. Drupal\Component\Plugin\Exception\PluginNotFoundException: The "...
-3
votes
0answers
16 views

Webform form payment

Am working to enable payment after filling up a webform in a Drupal 7 site. Specifically users can fill up a form and before the form is submitted should pay a small fee. Once the transaction is ...
1
vote
2answers
620 views

Setting the default value of an entity form radio button using hook_form_FORMID_alter

I have written a custom Drupal 7 module which needs to set the value of a radio button of an entityform based on a value queried from the database. I have tested hook and it is working as i am able to ...
-2
votes
0answers
13 views

migrating the data via SQL source create logging, how?

when migrating the data via SQL source, I would like to have a log file created, which records were migrated. How can I solve these tasks? Are there already ready-made solutions? How can I build my ...
0
votes
1answer
14 views

Implement variable in node confirmation popup [closed]

I want to add a confirmation popup for node form. The message should be changed dynamically. The code below worked fine in form_alter. $form['actions']['submit']['#attributes']['onclick'] = 'if(!...
4
votes
2answers
740 views

Pitfalls when updating a site without entering maintenance mode?

Assuming there are no module updates that require doing a database update, if it's just an update to a newer minor release of Drupal core, as well as of contrib and custom modules, what potential ...
0
votes
1answer
396 views

Trying to pass id to the ajax callback function, keeps overwriting, how to solve this?

I created a form which have a lot of images and a delete button on every each one of them. I used ajax to create a callback function which would delete the image. Here is part of my form: foreach($...
0
votes
1answer
23 views

Converting a form field to multiple submit buttons?

I'm not sure how to explain this well in text, but I want to change this: Into something like this: In Drupal 8, I have an entity for which the only user-editable field is Score, which is a List (...

15 30 50 per page