This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Redirect node creation form if user has x amount of nodes of that type

I am migrating a Drupal 7 site to 10, and currently I have the PHP code at https://www.drupal.org/node/1893978 working with Rules, but there is no way to do this with Drupal 10 and Rules as there is no form actions with Alpha.

ECA looks promising, but I could not figure out a way and it may be too bloated to use ECA (will need 4 or 5 mods enabled), to achieve this.  The below code is what's being used currently, how can this be modified into a simple module to work in Drupal 10?

TFA verification page is not displayed even after enabling TFA.

I have enabled tfa for one of the users. The message "TFA Enabled successfully" is displayed. But when I login with the same user credentials and the login was successful without asking for verification. I tried giving the hardcoded hash value as well. It shows that access is denied (It is not the right way). It is not redirecting to the verification page. What changes should I make for the verification page to be displayed.  My drupal version in 9 and tfa version is 1.0. I have installed the modules through composer.

Node::create / $node-save() generate a error randomly

I have an big issue.

I use a csv file as entry in order to generate/create dynamically node in Drupal 10 (inside a hook_cron).

But even for 10 lines of data I have a mysterious behavior, the code wants to create the same content node with the same entity_id value.

Event if I create data line by line (csv) and when each data is different.

The error is about integrity constraint violations duplicate entry. 

Sort Paragraphs programmatically from the theme

I have a paragraph of paragraphs, and I would like to be able to sort it via 2 fields inside the child paragraphs, but I am having issues with it. (I can only do it from the template, as I have no access to create or modify modules)

  • Employment changes
    • Employmentchange1
      • Title: Mr Power
      • Rank: 2
    • Employmentchange2
      • Title: Mr Ben
      • Rank: 1
    • Employmentchange3
      • Title: Mr Ahoy
      • Rank: 3

And I want these to be rendered by Rank. So they show like so:

DRUPAL 7.97 - Module Update - google analytics

I have updated my DRUPAL with the latest updates using Pantheon, and I am trying to update the Module - google analytics.
I want to use GA4 for Website Tracking for which I am trying to update my Google Analytics Modules

The application did not respond in time.

. - I get an error when I try to Download and update the module in my DEV environment.
I have updated all the required Updated, and my Dev Site is up to date with the updates from DRUPAL

Module to upload then edit content similar to creating an article

I really want to upload a content file, convert the content to Drupal article, then open the content in the article edit page.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions