Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Dear community, devel is an awesome tool in drupal 7, it works like a charm when using dpm, however in drupal 8, the new tool (Kint) doesn't work fine, it is super heavy and really hard to read. so please #makedevelgreatagain
I need to automatically assign a role to users who register according to a given condition in a field during registration.
For example, when an anonymous user registers on the site, there is a field that serves to select the type of user (this field is additional to the basic user registration form). I need that according to the "type of user" that the user chooses, a role is assigned automatically.
I have started to perform unit tests with phpunit and mocks. No problems to mock objects of my custom entities but when I try to create a mock for the logger (\ Drupal :: logger) I have the following error:
1) Drupal\Tests\tp_barriers\Unit\BarriersRestTest::testTransformSingleBarrier
Error: Call to undefined method Mock_LoggerInterface_2a821375::get()
I have a site that is being upgraded from 6 to 8 and it is image intensive - they are all on my host server. It is a rewrite. I don't want the user to have to upload hundreds images as they are already on the server.
8.5 doesn't allow Media Entity to be installed (which was a suggested route) as the functionality is now in core, but where can I set up access to the server as an upload route for my user.