The Drupal 10 release, as described, is mostly about deprecations and removing old code. So it's pretty easy to port your modules to Drupal 10, they said!
But actually - not!
Together with deprecations, we have some libraries updated to the new major versions too, and this can bring you little unexpected surprises when you try to make your module compatible with both Drupal 9 and 10 versions together.
Here I am again!
In Drupal 7, I've always used Rules a lot for some automations. I got to have dozens and dozens of rules in some projects.
Now, studying Drupal 10, I also intend to be able to use them a lot.
But right off the bat, I ran into the kind of problem I don't have the ability to solve.
Simple thing for expert friends, I think.
When I'm inserting a rule, more precisely a condition, where I want to compare two fields of a content type, we have the option to browse the fields in "data selector" mode.
I need to stick specific comment on top of others which will remain from oldest to newest. When it's stick on top it's replies must be with that comment.
So I made links in .module file which will take method from controller
Hello friends.
Unfortunately I'm here again asking for help.
I know I've already spent my two tokens on questions, but I leave here my supplications for new doubts.
This time I searched for everything and not even ChatGPT could help me.
What I want, and I already did this in Drupal 7, is, through crontab, to activate a function inside a Drupal 10 module, fully activating Drupal, to execute the code in a module.
I found 3 solutions on the Internet, but none of the 3 works.
Important consideration:
I have a content type authors with fields: field_authorname, field_authorpicture, field_authorbio.
Then I have a paragraph type: author_selection with field_author (referenced type authors)
In contenttype news the field field_news_content is paragraph author_selection selected.
now I want to show field_authorname, field_authorpicture, field_authorbio by use of a twig template.
I would like to be able to find the origin of an error like
[Saving a node] Warning: Array to string conversion in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue() (line 2579 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php).
in a minute or two.
I just spent two hours discovering that the error came from a contrib module.
I've got a setup on a Linux workstation with a local MySQL, Apache, Xdebug, VS Code (with a gazillion extensions)... And still I resorted to lowly trial and error.