We are able to create a rule but not able to add a condition or action to the rule.

Steps to recreate:

1. $drush dl business_rules
2. $drush en dbug
3. $drush en business_rules
4. Navigate to admin/config/workflow/business_rules/action/collection
5. Choose "Add action"
6. Choose System > Show a message
7. Choose Continue
8. WSD

We also tested creating a Rule first and then adding an action but the result was the same. In addition, we enabled devel and kint and was unable to get debugging information.

Thanks!
Cielo

CommentFileSizeAuthor
wsd.png53.49 KBC13L0
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

C13L0 created an issue. See original summary.

yseki’s picture

Hello Cielo,

I've tested the issue kind of following the steps you've described, but I could not reproduce the issue.
See: https://youtu.be/ArbCRDvd9aI

It may be an incompatibility with some module you have installed.

You can change the php.ini file on the following properties in order to display the PHP errors:

error_reporting = E_ALL
.
.
.
display_errors = On

Also, make sure you have downloaded the necessary libraries as showed on the video.

Regards,

Yuri

yseki’s picture

Assigned: Unassigned » yseki
Status: Active » Closed (works as designed)
C13L0’s picture

@yuriseki,

I truly appreciate you taking the time to create the video! As per your recommendation, we painfully disabled each and every module until we found the problem was with Token. We have submitted a ticket in the Token issue queue https://www.drupal.org/node/2881870

C13L0’s picture

While I don't think that this issue is specific to Business Rules, I'm adding it as a related issue to Token for others who may run into this issue =)

yseki’s picture

@C13L0,

Thanks for adding the issue and I hope Token module solves it :-)

BTW, The video I made for you helped me to learn a bit more about video capture so I decided to create a video series explaining how to use each functionality of Business Rules module and I will update the documentation as soon it is done.

rsbecker’s picture

I don't think the error is caused by token. Here is what I get when I try to create an actions, condition or variable:

The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1118 The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 8 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: @message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:45:"Drupal\Core\Database

There's gobs of stuff that follows this. It appears to be related to dBug, but there is nothing in the issue queue there.

mausolos’s picture

@rsbecker: I have the exact same problem, same WSD + log garbage. I even tried increasing innodb_log_file_size, just in case! :o

However, when I disabled the token module and tried again, the error did not present itself. As unfortunate as this is, this does seem to be a Token issue.

dendreten’s picture

Version: 8.x-1.0-alpha10 » 8.x-1.0-beta4
Status: Closed (works as designed) » Active

I confirm the issue is still present, as I'm experiencing it myself.

The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1118

It appears to be a conflict between token and business rules, where :
- Business rules claims it's a Token issue (see above)
- Token claims it's a Business rules issue (https://www.drupal.org/project/token/issues/2881870#comment-12826075)

I would think the second is correct as :
- I'm not finding anything on the Internet on other modules having a similar issues with Token.
- Others have reported it (https://www.drupal.org/forum/support/post-installation/2017-12-13/databa...)
- Token has 820K installs, while Business Rules has 400.

@rsbecker, @mausolos, @C13L0, did you manage to solve this issue? Can you pls share?

@yuriseki : can't this be fixed on the business rules side?

thanks in advance to all.

rsbecker’s picture

Sorry to say I can't help here. I gave up on Rules in D8 because it was very difficult to use and had lots of problems.

dendreten’s picture

Status: Active » Fixed

I managed to resolve it by adding the following parameters to the mysql configuration (mysql.cnf in a docker environment, I suppose my.cnf in a non docker environment), as recommended in this post.

max_allowed_packet = 512M
key_buffer_size = 128M
table_open_cache = 64
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 240K
query_cache_type = 1
query_cache_size = 256M
query_cache_limit = 32M
max_heap_table_size = 92M
join_buffer_size = 4M
thread_cache_size = 4
innodb_buffer_pool_size = 1024M
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 256M
innodb_log_buffer_size = 32M
innodb_flush_log_at_trx_commit = 0
innodb_doublewrite = 0
innodb_support_xa = 0
innodb_file_per_table = 1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

liquidcms’s picture

this isn't fixed and it is an issue with BR module not doing the token browser correctly. My guess is they load it multiple times and it causes memory issues. If you hack /token/src/TreeBuilderInterface.php and reduce the value (forget which one; but obvious) to something much less, like 2 (??) it fixes the issue - but this is the only module requiring this hack.

schnydszch’s picture

Hi! Any update to this? It seems I am having this problem with my drupal installation. Thanks!