Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display public title and description on profiles and unsubscribe/subs… #18645

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

seamuslee001
Copy link
Contributor

…cribe forms as appropriate if set

Overview

This starts to make use of the new frontend title and description fields if on unsubscribe / subscribe / user dashboard pages

Before

Internal / Private group title & description fields would be used all the time

After

Public title or description or both fields used if set otherwise fall back on the internal fields

ping @artfulrobot @agileware-justin @demeritcowboy

@civibot
Copy link

civibot bot commented Sep 30, 2020

(Standard links)

@civibot civibot bot added the master label Sep 30, 2020
@agileware-justin
Copy link
Contributor

@seamuslee001 let me be the first to say, thank you very much for listening to user feedback

This is a welcome improvement and I have tasked an Agileware team member to review this next week.

Agileware Ref: CIVICRM-1577

@agileware-justin
Copy link
Contributor

agileware-justin commented Oct 8, 2020

@seamuslee001 I have tried to test this using CiviCRM 5.30.beta1 but it looks like the new fields were not created and there's no updates pending. Here's the error. Any tips how to resolve?

Oct 08 18:01:13 [debug] $backTrace = #0 /var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(433): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException))
#2 /var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm.php(1644): CRM_Core_Invoke::invoke((Array:2))
#3 /var/www/vhosts/training.agileware.com.au/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
#4 /var/www/vhosts/training.agileware.com.au/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
#5 /var/www/vhosts/training.agileware.com.au/public_html/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
#6 /var/www/vhosts/training.agileware.com.au/public_html/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#7 {main}
Oct 08 18:01:48 [error]
$Fatal Error Details = array(3) {
["message"]=>
string(41) "The field 'frontend_title' doesn't exist."
["code"]=>
NULL
["exception"]=>
object(CiviCRM_API3_Exception)#1827 (8) {
["extraParams":"CiviCRM_API3_Exception":private]=>
array(3) {
["is_error"]=>
int(1)
["error_message"]=>
string(41) "The field 'frontend_title' doesn't exist."
["error_code"]=>
string(9) "undefined"
}
["message":protected]=>
string(41) "The field 'frontend_title' doesn't exist."
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(102) "/var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm/api/api.php"
["line":protected]=>
int(133)
["trace":"Exception":private]=>
array(18) {
[0]=>
array(3) {
["file"]=>
string(108) "/var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php"
["line"]=>
int(1579)
["function"]=>
string(12) "civicrm_api3"
}
[1]=>
array(5) {
["file"]=>
string(124) "/var/www/vhosts/training.agileware.com.au/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form/EntityFormTrait.php"
["line"]=>
int(272)

Screenshot_20201008_180600

@seamuslee001
Copy link
Contributor Author

@agileware-justin
Copy link
Contributor

Thanks @seamuslee001

I did try first using civicrm-NIGHTLY-wordpress.zip ( 5.31.alpha1-202010080530 ) from https://download.civicrm.org/latest/

But there's something wrong with that one, site was completely cactus after installing.

Will try again using 5.31.alpha1 - built a different way and see if that works.

@agileware-justin
Copy link
Contributor

agileware-justin commented Oct 8, 2020

@seamuslee001 thanks again for this PR.

Here is some feedback on the Group Settings Form:

  1. Can you please group the Internal fields, Title and Description and separately group the Public Title and Public Description. This groups them logically according to function, rather than label as you have done currently.
  2. Having the fields group logically, means that you only need to display field help for each group, not each field. The field help should be written to explain Title and Description for both public and internal fields. Something like:
    For internal fields: "The Group Title and Group Description is used to explain the purpose of this group and will be shown publicly if no Public Group Title and Group Description is set".
    For public fields: "Use the Public Group Title and Public Group Description to explain the purpose of this group to Internet users when listed in Public Profiles and Mailing List Subscribe Forms".

Other comments, may or may not want to tackle in this PR:

  1. The Modified By field is currently displayed in very weird location. Really should be at the bottom, possibly below Is Active.
  2. Showing Modified By and no Modified Date is weird - don't know why that information is not shown, would make sense to display and group together.

Screenshot_20201009_091453

@agileware-justin
Copy link
Contributor

Unfortunately, I was not able to get CiviCRM to display the Public Group Title or Public Group Description when viewing the Mailing List Subscription page, /civicrm/mailing/subscribe/?reset=1

Cleared caches etc. no joy there.

Screenshot_20201009_091405

@agileware-justin
Copy link
Contributor

The Unsubscribe Confirmation page does not display the Group Title or Group Description at all, public or internal. That's not a problem - totally cool with that - just noting it here.

Screenshot_20201009_091204

@agileware-justin
Copy link
Contributor

Tested using CiviCRM 5.31.beta1

…cribe forms as appropriate if set

Ensure that front end fields are shown correctly on the mailing subscribe form

Re-arrange form as per Justin's comment
@seamuslee001
Copy link
Contributor Author

@agileware-justin I have sorted the mailing subscription page now and also I have re-ordered the group edit form to be a bit more sensible I would say.

@eileenmcnaughton
Copy link
Contributor

@jusfreeman are you able to re-review (against the now wp-friendly tarball :-) - there are new fixes

@agileware-justin
Copy link
Contributor

Thanks @seamuslee001

@eileenmcnaughton reviewing now, will provide an update shortly.

@agileware-justin
Copy link
Contributor

@seamuslee001 and @eileenmcnaughton results of my testing are detailed below. Items 4 and 5 need action.

  • 1. The new grouping of fields makes much more sense.
  • 2. The field help position is unique on this page, but the meaning is understood and clear.
  • 3. The Created By and Modified By fields are now in a logical location, down the bottom.

Screenshot_20201020_131911

  • 4. Contact Dashboard does not show the Public Group Title and Public Group Description. Still shows the (internal) Group Title and Group Description fields. See screenshot below.

Screenshot_20201020_131857

  • 5. When using a Profile as a Profile Search Listing / Listing, this page does not show the Public Group Title. Shows the (internal) Group Title. See screenshot below.

Screenshot_20201020_113615

  • 6. Mailing List Subscribe page correctly displays the Public Group Title and Public Group Description.

Screenshot_20201020_110055

  • 7. Mailing List Unsubscribe page correctly displays the Public Group Title and Public Group Description.

Screenshot_20201020_105736

@eileenmcnaughton
Copy link
Contributor

Ok - those seem non-blocking & this is an improvement as it stands then so I will merge. You might like to do a follow up patch on those places....

@eileenmcnaughton eileenmcnaughton merged commit 7dc9cb4 into civicrm:master Oct 20, 2020
@eileenmcnaughton eileenmcnaughton deleted the frontend_group branch October 22, 2020 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants