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

CSV file import programmatically

I need to import data from a csv file. I tried feeds but I don't know why it doesn't upload all the data and I decided to do it manually.
I wrote a form and in the buildForm I inserted the file choice fields, text field to display the line that I import and the button to start the import.
Since I am still inexperienced with Drupal mechanisms, I would like to show the various steps in the submitForm func to understand what to do.
I had thought about using the command

validate

In version 8.17 I used the code below to avoid inserting a node with the same title.
I upgraded to version 9.2.6 and the same code no longer works for me. I checked but it doesn't seem like anything has changed.
This is the code I use

Force German language when mapping language field on a migration?

Content type is for blog_articles and default language is EN. Would like to enable "Show language selector on create and edit pages" so articles can be created with German language selected (without there being an English version)

How to paginate a table using ajax in from?

I need to use form pager to paginate a table that I get from ajax
updating the from ['pager'] from the ajax method if it creates the paging but the navigation between the pages does not work.

Drupal in iframe - login fails. What is the reason: rest/csp/cookie/routing/thinking error?

Hello all,
I've been puzzling over some strange behavior for a while now. I have integrated a Drupal page into another page via iFrame. Works fine, CSP-Header & Co are set correctly (as far as I know) only when logging in via modal form (Bootstrap) the user is authenticated correctly according to the log, but the call right after that gives an "access denied" again. (CacheableAccessDeniedHttpException). Without iframe it runs smoothly - and once logged in without iframe it continues authenticated in the iframe. Permission settings are definitely not the problem.

create Custom Drush Commands in Drupal 8

How to write the custom Drush Commands in Drupal 8?

Pages

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