? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
19 Oct 2018

This PR adds frontend editing to com_contact.

Summary of Changes

Adding form view and accompagning controller and model to com_contact frontend

Testing Instructions

  • Test adding and editing contacts from frontend. If the user is authorised, he should see an edit link in the category view and contact view. The category view additionaly has a "New" button.
    The featured view doesn't have any such links.
    There is a menuitem to point to create new contacts.

  • Test that data doesn't get lost when saving (especially data not available to edit in frontend vs backend).

  • Test especially also ACL. JSST should look over it for possible security issues.

Expected result

Works

Actual result

Frontend editing not possible.

Documentation Changes Required

A new help page will be needed. Possibly also other doc pages.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar Bakual Bakual - open - 19 Oct 2018
avatar Bakual Bakual - change - 19 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2018
Category Administration com_contact Language & Strings Front End
avatar Bakual Bakual - change - 19 Oct 2018
Labels Added: ? ?
avatar Bakual
Bakual - comment - 19 Oct 2018

I will solve the various codestyle issues later. Those are the ones PhpStorm either does wrong or doesn't detect.

avatar Bakual
Bakual - comment - 20 Oct 2018

Codestyle issues solved now.

avatar Quy
Quy - comment - 26 Oct 2018

After saving in PHP error log:

PHP Notice: Undefined index: params in \administrator\components\com_contact\models\contact.php on line 353

avatar Bakual
Bakual - comment - 27 Oct 2018

@Quy Should be fine now. The notice happend because the backend model expected the data to be present, but in frontend the links aren't in the form.

avatar Quy
Quy - comment - 27 Oct 2018

Missing COM_CONTACT_FIELD_LANGUAGE_DESC

language

avatar Bakual
Bakual - comment - 28 Oct 2018

@Quy Thanks! I've added the missing language string and removed the superfluous else.

avatar BertaOctech
BertaOctech - comment - 16 Nov 2018

I have tested this item successfully on 9d1bd59

We have modify a single contact and it has worked fine
We have created a new contact from the category view and modify it
We have checked the public cannot edit the contacts
We have created a menu item for new contacts

Everything worked as expected


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar BertaOctech BertaOctech - test_item - 16 Nov 2018 - Tested successfully
avatar Quy
Quy - comment - 17 Nov 2018

I have tested this item successfully on 9d1bd59


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar Quy Quy - test_item - 17 Nov 2018 - Tested successfully
avatar Quy Quy - change - 17 Nov 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Nov 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar Bakual
Bakual - comment - 10 Dec 2018

@joomla/cms-maintainers Can I have a decision here if this goes into 3.10 or 4.0?

avatar rdeutz
rdeutz - comment - 17 Dec 2018

I think the decision was no new features in 3.10 (or whatever the bridge version to 4 is called) so this has to go into 4 if we don't have a minor version before the bridge

avatar kofaysi
kofaysi - comment - 18 Jan 2019

I have tested this item 🔴 unsuccessfully on 9d1bd59

All the following are frontend issues.

Custom field groups are not visible and editable. Even not for a new contact.

I sometimes experience a major delay in applying the access or view rights:

  • When a non-editor user is logged in after an editor user, the non-editor could see the "New" button, but "Error: Create record not permitted." is displayed on access. The item has been checked-in already by then.
  • When an editor user is logged in after a non-editor user, the editor could not see the "New" button. Refresh of the page and Cache clearing in the browser did not help. I had to logout and login and refresh page. Strange.

The privacy request label is not rendered, but I guess this is not belonging to this PR.

In the list of the items (contacts) of the category, two edit link are accessible: an icon and a text link.

  • The text link context help (on cursor hover) reads "Edit article".
  • The icon context help reads "Edit contact | Published | [some date] | Written by" -- the message is truncated, the name of the editor is not displayed.
    This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.
avatar kofaysi kofaysi - test_item - 18 Jan 2019 - Tested unsuccessfully
avatar kofaysi
kofaysi - comment - 18 Jan 2019

Oh, and after reverting the patch I realized that the subcategories heading was not displayed in any of the categories, while the patch was applied.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar infograf768
infograf768 - comment - 18 Jan 2019
avatar Bakual Bakual - change - 18 Jan 2019
Labels Added: ?
avatar Bakual
Bakual - comment - 18 Jan 2019

Oh, and after reverting the patch I realized that the subcategories heading was not displayed in any of the categories, while the patch was applied.

I can't imagine how that could be related to this PR. I didn't touch the code related to showing subcategories.

The text link context help (on cursor hover) reads "Edit article".

Found the culprit for that one. Good catch.

The icon context help reads "Edit contact | Published | [some date] | Written by" -- the message is truncated, the name of the editor is not displayed.

this shows fine for me. Could it be that the user who created that article has been deleted?

Regarding the privacy stuff, I have no clue how that is supposed to work. I've never looked into that so far.

With Editor user you refer to a user with edit privileges? And non-editor would be one who is only able to create?

avatar kofaysi
kofaysi - comment - 18 Jan 2019

Oh, and after reverting the patch I realized that the subcategories heading was not displayed in any of the categories, while the patch was applied.

I can't imagine how that could be related to this PR. I didn't touch the code related to showing subcategories.

I have missed that one. It is me, who did not checked back on it. Sorry, The subcategories show up.

The icon context help reads "Edit contact | Published | [some date] | Written by" -- the message is truncated, the name of the editor is not displayed.

this shows fine for me. Could it be that the user who created that article has been deleted?

No, he/she still exist. I checked and it does not happen with the new commit. The snippet seems non-truncated and full.

Regarding the privacy stuff, I have no clue how that is supposed to work. I've never looked into that so far.

With Editor user you refer to a user with edit privileges? And non-editor would be one who is only able to create?

Yes, please. It is about the right to edit and create the contacts. But we have only users who can both create and edit and those who cannot do it.

avatar kofaysi
kofaysi - comment - 18 Jan 2019

I have tested this item 🔴 unsuccessfully on 4d758ce

I sometimes experience a major delay in applying the access or view rights, described earlier. Login and logout various test users. The edit links appears after few seconds of active browsing the contact items.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar kofaysi kofaysi - test_item - 18 Jan 2019 - Tested unsuccessfully
avatar kofaysi
kofaysi - comment - 18 Jan 2019

Custom field groups (tabs) are missing from the edit interface entirely.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar Bakual
Bakual - comment - 18 Jan 2019

No, he/she still exist. I checked and it does not happen with the new commit. The snippet seems non-truncated and full.

I haven't changed anything there, so it seems to have been a glitch.

I sometimes experience a major delay in applying the access or view rights, described earlier. Login and logout various test users. The edit links appears after few seconds of active browsing the contact items.

That's real strange. it's probably related to session lifetimes, cache or whatever. You probably get the same effects with com_content frontend edit.
I doubt it's related to this PR itself.

Custom field groups (tabs) are missing from the edit interface entirely.

Yep, confirming that and I need to investigate why that is.

I also have to test again with various users to see what this permission thing is.

avatar infograf768 infograf768 - change - 18 Jan 2019
Status Ready to Commit Pending
Labels
avatar infograf768
infograf768 - comment - 18 Jan 2019

Back to pending.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar infograf768
infograf768 - comment - 18 Jan 2019

Back to pending.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar Bakual Bakual - change - 18 Jan 2019
Labels Removed: ?
avatar Bakual
Bakual - comment - 18 Jan 2019

I found the issue with the custom fields. They were actually showing, but those from the mail section and not the ones from the contacts.
I've now renamed the form so I can properly detect it in the validateSection function. Now it works for me.

I couldn't reproduce the permission issue with the editor and non-editor users. That sounds like something on your setup which doesn't play nice. Maybe cache related?

avatar kofaysi
kofaysi - comment - 19 Jan 2019

I found the issue with the custom fields. They were actually showing, but those from the mail section and not the ones from the contacts.
I've now renamed the form so I can properly detect it in the validateSection function. Now it works for me.

I couldn't reproduce the permission issue with the editor and non-editor users. That sounds like something on your setup which doesn't play nice. Maybe cache related?

I switched off System cache (OFF - Caching disabled) and the behavior is correct -- tried to log in and out of various users a couple of times. Previously the progressive caching has been set for system cache. Does that make sense to you? I have no knowledge about these cache relations.

avatar kofaysi
kofaysi - comment - 19 Jan 2019

I have tested this item successfully on 3d5c8fa

Saving data ok.
Custom fields displayed, editable.
The previously experienced regression with view and edit rights was due to system cache probably. System cache set to "OFF - caching disabled" instead of the previous "ON - progressive caching".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22735.

avatar kofaysi kofaysi - test_item - 19 Jan 2019 - Tested successfully
avatar kofaysi
kofaysi - comment - 19 Jan 2019

By using the frontend, I was able to create two test contacts with the same alias and no warning has been issued.
image

When creating the same test contact in the backend, a warning has been issued
image
Although, no alias has been inserted by the editor, only the contact name.

I have a single remark to both above behaviors:

  • The alias should be altered automatically by concatonating "-2", "-3", etc. (as "Save as new" does)
avatar Bakual
Bakual - comment - 20 Jan 2019

I'll check the cache thing. I haven't used cache much myself but I think it usually gets disabled when a user is logge din. Maybe that's not done in com_contact.
I'll check the alias as well and see how that is done in com_content. So we have the same behaviour in both places.

avatar Bakual
Bakual - comment - 22 Mar 2019

Closing in favor of rebased 4.0 PR: #24311

avatar Bakual Bakual - change - 22 Mar 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-03-22 10:18:20
Closed_By Bakual
avatar Bakual Bakual - close - 22 Mar 2019

Add a Comment

Login with GitHub to post a comment