Allow to login with e-mail

Allow to login with e-mail

As follow up to my previous issue, I think it would be nice to allow email address to be set as username for login. Or at least don’t require username field and default it to use email address. This is a use case for Facebook login which allows email address be... read more
Allow to login with e-mail

How do I display the language settings (Site language field) on the user registration form?

I’m trying to display the user’s language settings field on the registration page, but no success so far. I’ve tried using a template (form–user-register-form.html.twig). This works for other fields, like mail, name, but I don’t know how... read more
Allow to login with e-mail

Menu theme suggestion ignored when cache turned on

I have an alternative main menu that is used on specific node types. When turning on the cache the menu block is cached. The theme suggestion for the menu is then ignored. I tried to disable the menu cache by changing the block preprocess cache settings. But the menu... read more
Allow to login with e-mail

Pay-Per-Node Functionality

My client would like a content type that has to be purchased by a registered user on a node-per-node basis. A previously registered user will see a view with the available content they can purchase and then that user can purchase individual nodes. These nodes that... read more
Allow to login with e-mail

How to check in a Rules Condition if an Ubercart product is out of order?

There isn’t a good support for “out of order” in Ubercart for Drupal. I’m trying to fix that with the Rules module. I’m trying to add a rule that disables the product after the stock is updated, using Rules event After updating existing... read more
Allow to login with e-mail

Print rendered field in views-view.html.twig

I try to render a custom node field in a views-view.html.twig and it works, the only thing is that i get the machine name and not the formatted name. Please can somebody describe me what i am doing wrong? I have tried several ways like: {{... read more
Allow to login with e-mail

Overriding system.site.uuid with an environment variable

I have a need to have separate sites behave as if they are clones of each other; that is, they each need to have the same site UUID. Due to the environment I am operating in, I am unable to change the site UUID via drush config:edit once the site is installed as I... read more
Allow to login with e-mail

Can’t get fid of the saved file after file_save_data

I have been trying to get the fid of the file which my custom module is saving and every time I end up getting the error “Trying to get property of non-object in report()”. I have tried file_object->id() and file_object-> fid ->value but neither... read more
Allow to login with e-mail

How to set default form fields value from controller

How to setup default form fields value from a form created in a controller? I tryed to set the $form_state param but it does not work. … $form_state = new FormState(); $form_state->set(‘myfield_1’, ‘car’);... read more
Allow to login with e-mail

Move all files and folders from a directory to another directory

I am unzipping some files and folders from an upload but the zip contains the files and folders one directory too deep. So currently they are located path-to-folder/anotherdirectory/ When I need them to be located at path-to-folder/ I have tried using the PHP rename... read more
Allow to login with e-mail

I can’t get the view ID/name in hook_preprocess_views_view_unformatted()

In this function I can’t get view ID/name. function THEMENAME_preprocess_views_view_unformatted($vars) { $view = $vars["view"]; $id = $view->storage->id(); $name = $view->name; } In hook_preprocess_views_view_fields(), it works properly. Why... read more
Allow to login with e-mail

Node view mode in page template suggestions

I would like page template suggestions when a node is using a custom view mode. I think this would happen in hook_theme_suggestions_page_alter(). I have already been able to get page-level template suggestions based on the node’s content type, so it seems like I... read more
Allow to login with e-mail

Change max length of signature field to more than 255 characters

How can I change the max length of the drupal 7 signature field to more than 255 characters? I’ve already changed the sql data type from 255 to varchar(900), yet drupal still shows the error, as soon as a user wants to update his signature to more than 255... read more
Allow to login with e-mail

How can I disable single option of checkboxes in drupal 8

I am using domain access module in Drupal 8. I want to disable one option/site in domain access settings in node edit page . I am trying to disable through hook_node_form_alter. Following is my array in node form alter Array ( [widget] => Array ( [#title] =>... read more
Allow to login with e-mail

How to sub_process a non-associative array in migration.yml

I know I can use sub_process to iterate over an associative array like field_categories: plugin: sub_process source: remote_categories process: target_id: plugin: migration_lookup migration: my_existing_taxonomy_migration source: name_of_key But I don’t know how... read more
Mathjax module does not render on edit ckeditor

Mathjax module does not render on edit ckeditor

I have installed mathjax module and ckeditor module, but when I try to insert math code using math button on ckeditor, the math codes does not rendered correctely, math code become hidden. Math code rendered successly after content is submited. is there anyone can... read more
Allow to login with e-mail

Unable to set cache max-age on ResourceResponse

I’m trying to create a REST API GET response. My class extends ResourceBase and this is inside its get() method. $response = new ResourceResponse([‘time’ => time()], 200); $cache_meta_data = new CacheableMetadata();... read more
Allow to login with e-mail

One image style not generated

UPDATE: After investigting this I have concluded that the problem concerns ALL new image styles, but “old” ones are still working. Old ones are the built-in (e.g. thumbnail) and one image style of my own. Also: I use the patch to create the in... read more
Allow to login with e-mail

How to change URL images for CDN

I have a website in Drupal 7 with “N” images in Sites/default/files and I need move this images to CDN. Is this possible? read more
Allow to login with e-mail

How to expose an entity reference field as a filter on a custom entity in Views?

I have a field on a custom entity that is an entity reference to a node. However when I select this field as a filter and expose it, it just acts like a numeric field instead of a reference field (only option is less than, greater than, equal to… etc). How can I... read more