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

DatabaseTransactionNoActiveException in my_module_node_validate

Hi everybody!
I constantly get in hook_node_validate() in certain situations the following error:

DatabaseTransactionNoActiveException: in DatabaseConnection->rollback() (Line 1061 of /blabla/www/mk/proben/includes/database/database.inc).

My hook looks like this:

Where is the code for Content Types created via the Admin Ui Stored?

Hello friends!

I just started Drupal 8 development so take it easy on me.

I have just created my first Custom Content Type programmatically via a custom module.

What I would like to do now is take a look at the code of Content Types I have created via the admin UI, could anybody advise me as to how I would go about finding the code for content types created via the Drupal admin UI.

Thank you in advance :)

REST - Creating a node works on local but not on production

I'm using the same version of Drupal 8 on both local and production. I'm trying to create a node using the Drupal 8 core REST api.

My curl looks like:

How to autotest CURRENT drupal environment?

I have made a new module. And I would like to have autotests for it. I made one and even could run it.

But my code doesn't work inside test, because it is run in a separated naked Drupal environment and I see errors that I never meet on my real environment.

My question: how to run autotests on the same drupal environment, or at least with 100% the same configuration? With the same unknown modules, the same configuration, etc.

Search API and partial word search : incorrect count of results

When we use Search Api and configure the server for "Match on parts of a word" or "Match words starting with given keywords", there is a wrong count of search results diplayed in Views.

For example, Views will give a count of 21 search results (numeral count plus pager count), but will list only 11 results (title and excerpt).

How to get rid of that? Thanks!

Creating a node via REST - Entity reference field value not updating

I'm trying to create a node on a Drupal 8 site via REST. Passing all the values to create the fields work fine apart from the field that is an entity reference field. The field is an entity reference to Drupal users. Drupal creates the node, there is no validations errors, but the entity reference field has no value. I've tried changing 'target_id' to 'value', same thing, the node gets created without errors but no value is given to the user entity reference field.

Any ideas?

Pages

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