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

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.

How to find out the PHP version even without access to web hosting?

Hello,

In WordPress, it was possible to find out the PHP version with the help of various free plugins, so I didn't even need access to web hosting. Is there something like this in Drupal, please?

Thank you

New Module Glossary Tooltip

I´m creating a new Module but I have this error Error: Cannot unset string offsets in Drupal\Core\Field\WidgetBase->extractFormValues() (line 381 of core\lib\Drupal\Core\Field\WidgetBase.php). I´m newer in Drupal but I´ve experience in PHP need help for fix this , I´m working with Drupal 10

Pages

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