JrAction Possible Bug

nate
@nate
11 years ago
917 posts
I have one module that the add_to_time_line button mysteriously gets turned off upon submit and now another module that has no support for jrAction, has no timeline button and yet gives me this error.

Quote: JSON response error: {"CRI":"invalid key name: jraction_add_to_timeline - key name must begin with module prefix: djlicense_"}

There is no such element in the form at all.
updated by @nate: 04/03/14 06:55:37AM
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
The latest copy of xtDJLicense that I have locally (a couple of months old) does have action support.

Take a look at the function named xtDJLicense_network_share_text_listener


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nate
@nate
11 years ago
917 posts
Action support was removed. I'll check that function.
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
It isn't that function Nate, my mistake.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nate
@nate
11 years ago
917 posts
There is no add to timeline button on the form, yet I still get the error.
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Assuming that you are not calling jrAction_save anywhere, the only thing I can think of is that you are adding to actions in one of the forms you have recreated in html.

I can see you have used that once in a template named xtSong_create.tpl (this is from the repo a couple of months back). If you have added jraction_add_to_timeline as a hidden field in other forms, that may be what is triggering add to timeline. So it could be something similar to what you had done in xtSong:
<input type="hidden" name="jraction_add_to_timeline" value="off">



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
That's normally added in by jrAction_form_display_listener, which I think only runs if the module has been registered for action support in the init function.

Not sure if add to actions would be triggered if that is in a form in a module not registered for actions, but worth a try.

What is being done when you receive the JSON response error? Is a form being submitted? If so, which one?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Another possibility, jrAction may be updated when approving a pending item, when sharing, and when verifying modules:

view_jrCore_pending_item_approve
view_jrAction_share
jrAction_verify_module_listener


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
And this may be useful if this is happening when creating or updating an item:

Try skipping key validation by adding the values to update to the 4th param ($_core) rather than the 3rd ($_data). That will skip the key check - so not a solution, but maybe something to help pinpoint exactly where things are going wrong.

So try
jrCore_db_update_item($module, $id, null, $_core)
rather than
jrCore_db_update_item($module, $id, $_data)



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags