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

dev/drupal#127 - CRM_Core_Session::setStatus() gets ignored sometimes #17914

Merged
merged 1 commit into from Jul 25, 2020

Conversation

demeritcowboy
Copy link
Contributor

Overview

https://lab.civicrm.org/dev/drupal/-/issues/127

This part isn't specific to drupal.

It looks like there are two paths to get a status message popup. One follows a javascript-only path, the other goes through templates/CRM/common/info.tpl. For the second one, if you only set a title and leave the message blank when calling CRM_Core_Session::setStatus(), then it gets ignored.

There's a couple places where this happens:

  • On the Create User Record action you can choose when viewing a contact
    • This is what the drupal ticket was originally about, but there's also a second bug in case of error so this alone doesn't fix the if-error part, but fixes the success message. On drupal 7 though you wouldn't think about it because you see the CMS's message anyway, but it's more obvious on drupal 8 (well, if the absence of something could be considered "obvious").
  • After doing batch update for contact records.
  • After deleting a campaign survey.

Probably the easiest way to reproduce is:

  1. Do a contact search.
  2. Select a couple and from the actions dropdown choose Update Multiple.
  3. Choose a profile. New Individual is simple.
  4. Make your changes and click Update.
  5. Did it succeed? It's a mystery.

Before

No popup status message.

After

Popup status message as intended.

Technical Details

All the code along the way seems to support having a title but no message except the last stage when it runs thru the template, where it only does anything if there's a message component.

Comments

@civibot
Copy link

civibot bot commented Jul 22, 2020

(Standard links)

@civibot civibot bot added the master label Jul 22, 2020
@demeritcowboy demeritcowboy changed the title [WIP] dev/drupal#127 - CRM_Core_Session::setStatus() gets ignored sometimes dev/drupal#127 - CRM_Core_Session::setStatus() gets ignored sometimes Jul 22, 2020
@eileenmcnaughton
Copy link
Contributor

@colemanw looks sane to me - thoughts?

@eileenmcnaughton
Copy link
Contributor

I'm gonna merge this - seems very sane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants