Closed (cannot reproduce)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2013 at 14:56 UTC
Updated:
22 Oct 2018 at 19:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fluffy commentedThe patch, adds default value for plugins in the schema.
Comment #2
fluffy commentedComment #4
ohthehugemanatee commentedI encountered this problem myself, and discovered the root of it (for me). If you have this problem, please post an export of your rule here!
Here was my rule:
The issue isn't that PLUGIN wasn't declared, it's that the rule label included special characters, and was double-quoted in the Feature export. It tried to evaluate the braces, and I suppose couldn't distinguish that PLUGIN was the next key in the array.
So for me the solution was simply to rename the Rule to avoid the braces (I went with "login redirect for resume-search") and re-export. Or just edit the code and revert. I would expect this to be a problem anywhere that Rules allows special characters which are double quoted in Features. So check your export!
Comment #5
hefox commentedThe general issue seems to be invalid json. Havent checked that the importing with latest -dev of entity/rules produces the invalid json, but trying to import the invalid json does and only fails at this stage.
So two problems
1) no warnings about invalid json
2) the export of invalid json
My json was not importing correctly due to a comma
Comment #6
tr commentedThis issue is very old - is this still a problem with the current version of Rules? There haven't been any further comments or reports of a similar problem for >5 years now.
I looked at this a little, and tried to reproduce some of it.
Specifically, for comment #5 there were two problems mentioned:
For 1), if I try to import the rule from #5, which has invalid JSON, then I AM given an error that the Rule contains invalid JSON.
For 2), when I export a rule with multiple conditions it does NOT add that extra comment that causes problems for you.
Comment #4 says that
"LABEL" : "login redirect (resume-search)",is invalid JSON because of the braces inside the label text. But that's not so - braces are allowed inside double-quoted strings like this. If that causes an error with Features, then that's a Features issue.As for the original post, reading through the linked issues in the commerce_recurring queue, it seems that individuals have traced their particular problem to other things, such as a missing dependency. Likewise, @fago looked into the need for a default value in #1046250: Plugin field in hook_schema lacks default value and concluded it wasn't required.
Rules uses the Entity API to generate the JSON for the export, and the Entity API uses the core Drupal function drupal_export_json(). So while there could conceivably be a problem with how Rules or the Entity API passes data to drupal_export_json(), if there are any syntax errors in the resulting JSON that really amounts to a bug in that core Drupal function.
If this is still a problem, I need to see specific steps to reproduce the issue. If it can't be reproduced, then we have no assurance that any change to Rules actually 'fixed' the problem.
Comment #7
tr commentedNo further information provided.