[Fixed r1911] Problems regarding change category assignment

More
11 years 8 months ago #47307 by jrodgar
Hi!

I see that there is a new set of permissions regarding "change category assignment", "change category assignment" and " Assign multiple categories to items"

First, the default behaviour is the opposite of the current behaviour

Second, it seems there are some bad interactions. For example, a simple editor, when creating a new article and, on save (or later, on save and close) show this error:
Code:
Error while validating data: exception 'RuntimeException' with message 'Campo requerido: Categoría primaria' in D:\Apache24\htdocs\joomla\libraries\joomla\form\form.php:1958 Stack trace: #0 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\joomla\form\form.php(1200): JForm->validateField(Object(SimpleXMLElement), '', NULL, Object(Joomla\Registry\Registry)) #1 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\legacy\model\form.php(302): JForm->validate(Array, NULL) #2 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\administrator\components\com_flexicontent\controllers\items.php(96): JModelForm->validate(Object(JForm), Array) #3 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\legacy\controller\legacy.php(722): FlexicontentControllerItems->save() #4 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\administrator\components\com_flexicontent\admin.flexicontent.php(222): JControllerLegacy->execute('save') #5 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\administrator\components\com_flexicontent\flexicontent.php(22): require_once('D:\Proyectos\Ca...') #6 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\cms\component\helper.php(352): require_once('D:\Proyectos\Ca...') #7 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\cms\component\helper.php(332): JComponentHelper::executeComponent('D:\Proyectos\Ca...') #8 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\cms\application\administrator.php(98): JComponentHelper::renderComponent('com_flexiconten...') #9 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\cms\application\administrator.php(159): JApplicationAdministrator->dispatch() #10 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\libraries\cms\application\cms.php(255): JApplicationAdministrator->doExecute() #11 D:\Proyectos\Cabildo\N03-Intranet\N98-testingdeployment\Apache24\htdocs\intracabtfe\administrator\index.php(42): JApplicationCms->execute() #12 {main}Click aquí para volver a la página anterior

Looks like the lock don´t allow the main category field to fill properly so its send empty?

Another thing is that "change category assignment", "change category assignment" does nothing if " Assign multiple categories to items" is not active


In our case this things dont bother much because we are gonna revert that permissions to allow to change, just like before, but I guess you´ll appreciate the report

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #47311 by ggppdk
Hello

this a new feature of v2.2.0 BETa

maybe some case was not anticipated

you got this message in submit form or in edit form (=existing item)?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #47317 by jrodgar
being honest I´m not sure!

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #47594 by jrodgar
Now I receive what it seems a related error:
Code:
Error while validating data: exception 'RuntimeException' with message 'Campo requerido: FLEXI_PRIMARY_CATEGORY' in /servers/exampledomain/libraries/joomla/form/form.php:1958 Stack trace: #0 /servers/exampledomain/libraries/joomla/form/form.php(1200): JForm->validateField(Object(SimpleXMLElement), '', NULL, Object(Joomla\Registry\Registry)) #1 /servers/exampledomain/libraries/legacy/model/form.php(302): JForm->validate(Array, NULL) #2 /servers/exampledomain/components/com_flexicontent/controller.php(339): JModelForm->validate(Object(JForm), Array) #3 /servers/exampledomain/libraries/legacy/controller/legacy.php(722): FlexicontentController->save() #4 /servers/exampledomain/components/com_flexicontent/flexicontent.php(174): JControllerLegacy->execute('save') #5 /servers/exampledomain/libraries/cms/component/helper.php(352): require_once('/servers/exampledom...') #6 /servers/exampledomain/libraries/cms/component/helper.php(332): JComponentHelper::executeComponent('/servers/exampledom...') #7 /servers/exampledomain/libraries/cms/application/site.php(178): JComponentHelper::renderComponent('com_flexiconten...') #8 /servers/exampledomain/libraries/cms/application/site.php(224): JApplicationSite->dispatch() #9 /servers/exampledomain/libraries/cms/application/cms.php(255): JApplicationSite->doExecute() #10 /servers/exampledomain/index.php(40): JApplicationCms->execute() #11 {main}Por favor, pulsa aquà para volver a la página anterior


This one happens when:

- On frontend
- Try to save empty item
- Message "Category required" appears
- Ignore message and, without selecting a category, save anyways
- That error

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #47611 by ggppdk
Hello

there are 3 different issue here:

- (client-side) form validation for core "required" properties broken in J3.3 (due to changes JS changes in J3.3.)
... thus CORE required properties are not enforced

- can change category is not a inherited ACL privelege it is Component only (that is why it is calculated wrong)

- add some check of required properties in server side to avoid exceptions being thrown, in case form submit without required fields



done the 1 and 2, will be in r1911

3rd is not a security issue
and it is rare and will occur only if JS error in form or user tampers with the form

so will fix later


Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49569 by jrodgar
Regarding the original error,

Second, it seems there are some bad interactions. For example, a simple editor, when creating a new article and, on save (or later, on save and close) show this error:


I´m still getting it on 1967

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49572 by ggppdk
Hello

this is for a different reason

e.g. if you submit form without selecting category , e.g. because of JS error

then yes you will see the above message
(the proper fix is redirect back to form instead of giving the above message, for any reason bug or not bug the form was submitted without category)

but now it is not because of permissions, that means if category selector is disabled then the category must get the default value

so is the category selector disabled, does it show the default value before submitting ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49576 by jrodgar
Yes, it shows the existing value. Is only the permission what is changing.

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49762 by jrodgar
Friendly bump

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #49772 by ggppdk
Hello

so when category modification is not allowed you get error when submitting the form ?

you may send me a PM with
- site url
- super admin access
- simple editor user access
- and item id

to review this

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save