
Dear developper
I would like to know if the tuto located at https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe... is right?
Following this with attention, I have the following error message when I want to add an article :
InvalidArgumentException: Field is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 509 of core\lib\Drupal\Core\Entity\ContentEntityBase.php)
Could you check?
Regards
Etienne
Comment | File | Size | Author |
---|---|---|---|
#5 | business_rules.zip | 188.12 KB | mrsmile |
#3 | dependent_field_not_working-2929219-2.patch | 5.83 KB | d.novikov |
Comments
Comment #2
cocq CreditAttribution: cocq commentedComment #3
d.novikov CreditAttribution: d.novikov as a volunteer commentedThere are 2 issues with the module:
handler_settings
indexAttaching the patch that hopefully fixes both ones. Please check!
Comment #4
mrsmile CreditAttribution: mrsmile commentedd.novikov,
could you please explain me how can I apply the patch?
Currently I have the similiar issue
thanks
Comment #5
mrsmile CreditAttribution: mrsmile commentedHi guys!
I tested this attached patch and I can say that it works (for first look)
you can find patched module in attach
thanks to d.novikov
Comment #6
socialnicheguru CreditAttribution: socialnicheguru commentedgit apply (patch name)
Comment #7
socialnicheguru CreditAttribution: socialnicheguru commentedThe patch addresses the initial issue.
It allows the code to continue to a new error below.
1. Create a rule
2. Create a condition. This case the condition is comparing a field in an entity.
I saved the condition without completing it
3. I added the condition to the rule I created
I then get the error below.
there is a comparison at line 158 in business_rules/src/Plugin/BusinessRulesCondition/DataComparison.php:
there should be an option if "$date_to_compare" is NULL or empty. IE someone has not finished the rule.
I found that the field that I was using was defined but the data_to_compare was not.
field = field_my_address
data to compate =
When I saved content or did 'drush cr' I get:
Error: Call to a member function get() on null in drupal-8.4.4/html/modules/download/business_rules/src/Plugin/BusinessRulesCondition/DataComparison.php on line 164
#0 drupal-8.4.4/html/modules/download/business_rules/src/Entity/Condition.php(225): Drupal\business_rules\Plugin\BusinessRulesCondition\DataComparison->process(Object(Drupal\business_rules\Entity\Condition), Object(Drupal\business_rules\Events\BusinessRulesEvent))
Comment #8
joao sausen CreditAttribution: joao sausen commentedUsing this patch in a project and I can confirm that it works.
Comment #9
dan_metille CreditAttribution: dan_metille commentedFor me, patch #3 helps fixing the module, but I'm indeed still unable to work with more than one field on the entity edit form. (I'm using the dev version).
Any help would be welcome.
Comment #10
yseki CreditAttribution: yseki as a volunteer and commentedFixed on version alpha11.
PluginBase in Drupal 8.5 does not bring the value of configuration['handler_settings'] as in previous version.
Comment #11
dan_metille CreditAttribution: dan_metille commentedDid not worked on alpha15. Switched to dev version with patch #3.
Comment #12
dan_metille CreditAttribution: dan_metille commentedComment #14
yseki CreditAttribution: yseki as a volunteer and commentedI've made some mistake with GIT.
It's fixed on DEV now.
Thanks
Comment #15
tudxndvn CreditAttribution: tudxndvn commentedHi @yuriseki : I am trying create node Job with taxonomy: State and City. I folllowed : https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe.... I work all step of it and it show state normal. But I don't know config Business Rules for change list value City when changed state . Can you tell me how to config Business Rules about: Rule , Action, Condititon.. My skype : batngodaisu. You can add my skype or reply me in this thread. Thank you
Comment #17
lule75 CreditAttribution: lule75 commentedI am trying to add an action to a condition but this is what i get.. I am using https://www.drupal.org/project/business_rules/releases/8.x-1.0-beta1
Fatal error: Call to a member function toString() on null in C:\xampp\htdocs\...\modules\business_rules\src\Form\ConditionForm.php on line 228
please help.. thank you in advance
Comment #18
tudxndvn CreditAttribution: tudxndvn commentedcool, it work for me. Thank @yuriseki. But i have a new question. I have 3 taxonomy : location, sub-region and region. When i update value of location , i want to fill automatic value of region and sub-region . Can we use Business Rules for this case. Thank you. Cheers!