I think there is a problem with setting assets with action 'subimt article'
We have a form 'add_news' made in chronoforms v4.0 in our Joomla 2.5 based site. Form submits an article with action 'submit article' - action settings are: published: yes, category: myCategory.
We have user group: 'Redaktor'. This group's permissions for category 'myCategory' are as follows:
Action Select New Setting Calculated Setting
Create Allowed Allowed
Delete Allowed Allowed
Edit Allowed Allowed
Edit State Allowed Allowed
Edit Own Allowed Allowed
Now the problem: when I create an article in category myCategory through backend, permissions are inherited correctly from category. But when I submit my 'add_news' form, the article is made in category 'myCategory', but it's permissions for group 'Redaktor' are
Action Select New Setting Calculated Setting
Delete Inherited Not Allowed
Edit Inherited Not Allowed
Edit State Inherited Not Allowed
Am I missing something here? Shoulden't the rights be inherited from category? Could You help me out with this one? Maybe this can be done by the 'custom code' action?
If You need more information about the topic - please, ask ahead.
Assets rows for category, content added with 'add_news' form, and chronoforms component itself:
id parent_id lft rgt level name title rules
543 45 797 820 3 com_content.category.179 myCategory {"core.create":{"6":1,"3":1},"core.delete":{"6":1,"3":1},"core.edit":{"6":1,"2":1,"3":1},"core.edit.state":{"6":1,"2":1,"3":1},"core.edit.own":{"6":1,"2":1,"3":1}}
522 1 1089 1090 1 com_chronoforms chronoforms {}
662 1 1307 1308 1 sbg2r_content.437 sbg2r_content.437 ''
and content itself look like this:
id '437'
asset_id '662'
title 'test for chrono'
alias 'test-for-chrono'
title_alias ''
introtext ''
fulltext 'tr'
state '1'
sectionid '0'
mask '0'
catid '179'
created '2013-08-13 23:59:30'
created_by '351'
created_by_alias 'm'
modified '0000-00-00 00:00:00'
modified_by '0'
checked_out '347'
checked_out_time '2013-08-14 09:59:14'
publish_up '0000-00-00 00:00:00'
publish_down '0000-00-00 00:00:00'
images ''
urls ''
attribs ''
version '1'
parentid '0'
ordering '0'
metakey ''
metadesc ''
access '1'
hits '1'
metadata ''
featured '0'
language '*'
xreference ''
From what I have managed to find the name and parent_id of asset for article is not right. parent_id should be 543, and name should be: article.com_content.437
Is there a way to fix it, modify 'submit article' action so it set asset right, or write a 'custom code' even. Can I modify the submited article during submit event?
We have a form 'add_news' made in chronoforms v4.0 in our Joomla 2.5 based site. Form submits an article with action 'submit article' - action settings are: published: yes, category: myCategory.
We have user group: 'Redaktor'. This group's permissions for category 'myCategory' are as follows:
Action Select New Setting Calculated Setting
Create Allowed Allowed
Delete Allowed Allowed
Edit Allowed Allowed
Edit State Allowed Allowed
Edit Own Allowed Allowed
Now the problem: when I create an article in category myCategory through backend, permissions are inherited correctly from category. But when I submit my 'add_news' form, the article is made in category 'myCategory', but it's permissions for group 'Redaktor' are
Action Select New Setting Calculated Setting
Delete Inherited Not Allowed
Edit Inherited Not Allowed
Edit State Inherited Not Allowed
Am I missing something here? Shoulden't the rights be inherited from category? Could You help me out with this one? Maybe this can be done by the 'custom code' action?
If You need more information about the topic - please, ask ahead.
Assets rows for category, content added with 'add_news' form, and chronoforms component itself:
id parent_id lft rgt level name title rules
543 45 797 820 3 com_content.category.179 myCategory {"core.create":{"6":1,"3":1},"core.delete":{"6":1,"3":1},"core.edit":{"6":1,"2":1,"3":1},"core.edit.state":{"6":1,"2":1,"3":1},"core.edit.own":{"6":1,"2":1,"3":1}}
522 1 1089 1090 1 com_chronoforms chronoforms {}
662 1 1307 1308 1 sbg2r_content.437 sbg2r_content.437 ''
and content itself look like this:
id '437'
asset_id '662'
title 'test for chrono'
alias 'test-for-chrono'
title_alias ''
introtext ''
fulltext 'tr'
state '1'
sectionid '0'
mask '0'
catid '179'
created '2013-08-13 23:59:30'
created_by '351'
created_by_alias 'm'
modified '0000-00-00 00:00:00'
modified_by '0'
checked_out '347'
checked_out_time '2013-08-14 09:59:14'
publish_up '0000-00-00 00:00:00'
publish_down '0000-00-00 00:00:00'
images ''
urls ''
attribs ''
version '1'
parentid '0'
ordering '0'
metakey ''
metadesc ''
access '1'
hits '1'
metadata ''
featured '0'
language '*'
xreference ''
From what I have managed to find the name and parent_id of asset for article is not right. parent_id should be 543, and name should be: article.com_content.437
Is there a way to fix it, modify 'submit article' action so it set asset right, or write a 'custom code' even. Can I modify the submited article during submit event?
Hi tiriana,
I haven't checked but I suspect that the Submit article action hasn't been updated to use the Joomla! 2.5/3.0 Access Control so it isn't setting user permissions correctly.
As a workaround you can probably get the new article ID and update the settings using a Custom Code action after the Submit Article action. I recall we did worked out something similar to handle a problem with duplicate aliases a year or so ago.
Bob
I haven't checked but I suspect that the Submit article action hasn't been updated to use the Joomla! 2.5/3.0 Access Control so it isn't setting user permissions correctly.
As a workaround you can probably get the new article ID and update the settings using a Custom Code action after the Submit Article action. I recall we did worked out something similar to handle a problem with duplicate aliases a year or so ago.
Bob
Thanks for reply. Could You tell more about me how to get the ID of the created article in 'custom code' action. I know there is way to put my code in 'controller' or 'view', and that there is access to $form varialbe. But I don't what else variables are available.
This topic is locked and no more replies can be posted.