0
votes

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.

UPDATE:

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       ''
1
Please show your asset records for the article and the category. - Elin
@Elin - I added 'asset' to the question content. - tiriana

1 Answers

1
votes

The save to the content table is incorrect if you are using categoaries. The third row shows a parent id of 1 which would be the root asset but if it is in a category it should be saved with a parent id equal to the category asset id. catid '179' so the parent id should be the asset id of 179.

I don't really know about chronforms but you need to fix the save so it know that. The name of the asset also looks wrong. If you are really trying to save in #__content it should be article.com_content.437