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

D7 - Change Price field to bigint

I have a project that is heavily depended on Rules. But since Rules is basically useless in D9 & D10 I'm forced to use D7.

A price input greater than 21474836 will cause this error:

Anyone know where we post drupal.org website issues?

I'm tempted to post an issue on core; but that seems incorrect. Anyone know where the proper place is to post drupal.org website issues?

Custom entity field is not saved after Entity::save()

Hello,

I try to save an entity, precisely one field in the entity, but after that, the field in the database table is not modified.

The database is Postgresql, v12....

The code is working well in the local environment, but not in the recipe (test) one.

Here is my code.

There are 2 ksm(). After execution, the first one display 1 (line 84), the second one displays null (line 86) instead of 1 if all things go rigth :

In the controller :

Node add and save.

Hello everyone.

I have to add to one of the content types the possibility that when NODE_TYPE_1 is saved, if field_1 (type number or string) has the value of something specific, when saving NODE_TYPE_1, NODE_TYPE_2 has to be added, created with the value of field_1 passed to one of the fields of NODE_TYPE_2.

Any idea what to use, a controller?, the hook_entity_insert? another hook?

How to dynamically switch between two databases for ALL queries in Drupal 9?

I need to copy some entities from one D9-database to different D9-database.

Both databases are full d9-databases - almost identical - but some nodes and users are present in one, which I need to copy to the other.

In Drupal 7 it was fairly simple. With both databases present in settings.php - let's say they were 'default' and 'second_db' - I could then do something along these lines:

<?php
// Switch to second database
db_set_active('second_db');

Custom sorting using a MySQL statement instead of simple field

I'm using a view to list products from db index. I want to implement a custom sorting (my goal is to sort by current taxonomy term page, products having a specific node field field_MY_FIELD_NAME = CURRENT_TID, showing up first)

First using hook_views_data_alter I override the sort of an indexed field that I have chosen as a sort criteria inside the view

Pages

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