Categories
CMS Drupal Mastering Development

Change User Expiration date in Opigno LMS drupal 7.x

I have installed Opigno module on drupal 7.X and configured all classes and courses, what I want is to modify the date of user expiration through a form that I set up, the date user expiration is plugin in the Opigno LMS module which allows to user to take a course until the date ended, […]

Categories
CMS Drupal Mastering Development

WidgetBase with Ajax Callback and manipulate #tree values

After many tries, maybe someone can help me here. I want a dynamic form field in a widget base, but I keep having problems. 1st Values of the submit button are lost after submit and can´t manipulate the value of ‘object_qt’. I thougt, they where handled in massageFormValue and saved in extractFormValues, but it´s not […]

Categories
CMS Drupal Mastering Development

reCaptcha validation on custom Drupal 8.x form

I have used reCaptcha module (8.x-2.5) for my Drupal 8.8.6 project. If the form is submitted manually, it works but I found that form is automatically submitted by bots. Is there any way to control it? Or put more form validation on the custom Drupal form ? One more, after enabling the module and defining […]

Categories
CMS Drupal Mastering Development

What’s the difference between the two-column layout and two-column bricks layout?

I enabled the experimental Field Layout core module. There are two different two-column layouts available: one called “two column” and another called “two column bricks.” The dialog provides the diagrams below which don’t clue me into their meaning. What is the difference between these layouts?

Categories
CMS Drupal Mastering Development

PHP error in the log after PHP and Drupal upgrade

I got this error message in the log but not sure what is it about and how to fix it. Has anyone seen the same issue before and know how to fix it? Thank you so much! Drupal\Core\Entity\EntityMalformedException: The “view” entity cannot have a URI as it does not have an ID in Drupal\Core\Entity\EntityBase->toUrl() (line […]

Categories
CMS Drupal Mastering Development

How to add a comment to a poll’s vote?

I have installed the Poll module in my Drupal 8 site and after a bit of struggling, it works as expected. I understood that, using /admin/config/content/poll, I can add custom fields to a poll (e.g. a text field to describe the object of the poll). I’d like each voter to be able to detail his […]

Categories
CMS Drupal Mastering Development

how to load all nodes from node table drupal 7.x [closed]

I am looking to display in a form $form[”] of type select all nodes of type ‘class’ I use the this code $nodes = node_load_multiple(array(), array(‘type’ => ‘class’, ‘status’ => 1)); foreach($nodes as $classes){ $values = array($classes->nid => t($classes->title)); } but when i pass the variable to the $form[”], it displays just the last node […]

Categories
CMS Drupal Mastering Development

what is the mechanism behind class comments?

* @QueueWorker( * id = “my_module_image_style”, * title = @Translation(“Generate image styles”), * cron = {“time” = 60} * ) And more specifically what is the effect of cron = {“time” = 60}

Categories
CMS Drupal Mastering Development

Override templates in profiles templates

in drupal 8 I’d like to be able to override a template found at the root of Drupal in profiles/name/modules/menu/template/menu.html. I tried to put it in the child theme in templates/ but both templates are taken into account, so my menu appears twice. How can I fix this problem? Thanks in advance

Categories
CMS Drupal Mastering Development

Merging Nodes from 2 Sources into 1 Render Array

So I’ve got a bit of a unique situation and I’m curious if anyone has any input. Summary:  I’m trying to figure out how to render 3 nodes from two different sources: 1st Source: A field of type entity reference that allows the user to associate up to 3 nodes of type B (children nodes) […]