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

5.64 one click #7

Open
wants to merge 12 commits into
base: 5.64
Choose a base branch
from
Open

5.64 one click #7

wants to merge 12 commits into from

Conversation

seamuslee001
Copy link
Owner

No description provided.

…orm-controller

Before: `civicrm/mailing/unsubscribe` points directly to `CRM_Mailing_Form_Unsubscribe`

After: `civicrm/mailing/unsubscribe` points to `CRM_Mailing_Page_Unsubscribe`, which MAY delegate
to `CRM_Mailing_Form_Unsubscribe`

Comments:

* This is a step toward supporting one-click subscribe.
    * The problem is that one-click unsubscribe MUST receive a POST on the same URL
      as a user-visible form.
    * In Quickform (esp `CRM_Mailing_Form_Unsubscribe`), every POST MUST give a `qfKey`.
    * We need a place to process the one-click POST *without* requiring `qfKey`.
* There is a pre-existing class `CRM_Mailing_Page_Unsubscribe`. This was dead code.
  The patch co-opts/re-uses the class for its own purpose.
    * The old `Page` class was not referenced anywhere (by routes or other classes).
    * What appears to have happened: this screen was originally a `Page`; then it was
      renamed/converted to a `Form`; then shortly after, the original `Page` was re-imported
      verbatim by a gsoc student. Their commit doesn't appear to make substantive use of
      the `Page`. This smells like mistake in handling branches/merges/rebases.
BEFORE: `MailingSystemTest` (which extends `BaseMailingSystemTest`)
includes `testGitLabIssue1108($isMultilingual)`. This is
a transactional test (per `BaseMailingSystemTest::setUp()`).

AFTER: `MultingualSystemTest` includes `testGitLabIssue1108()`.
This is not a transactional test.

COMMENTS: This resolves some circumstantial flakiness in the tests.

* The problem appeared when adding an unrelated test `BaseMailingSystemTest` -- the
  new test failed because of a conflict with `testGitLabIssue1108()`.
* You could also produce the problem in other cases by switching around the order of
  `testGitLabIssue1108()` (e.g. hack data-provider `multiLingual()`)
* I believe the root problem is that `BaseMailingSystemTest` is written as
  a transactional test -- but `testGitLabIssue1108()` does large-scale
  schema changes (whenever it toggles multilingual), which makes it
  non-transactional.
* The patch here prevents these kind of conflicts by putting
  `testGitLabIssue1108()` in a separate (non-transactional) context.
When delivering via unit-test or cron job, the URL came out absolute.

But when using web UI to "Send test", the URL was relative.

It should be absolute.
@eileenmcnaughton
Copy link
Collaborator

@seamuslee001 not 5.69?

@seamuslee001
Copy link
Owner Author

@eileenmcnaughton no working on this for AUG and they are on 5.64 at the moment

@eileenmcnaughton
Copy link
Collaborator

@seamuslee001 OK - so this is just termporarily open on 5.64 for your own purposes?

@seamuslee001
Copy link
Owner Author

@eileenmcnaughton yes and also this is on my own repo not against a core repo :)

@eileenmcnaughton
Copy link
Collaborator

@seamuslee001 yeah - you are right - why do I get notified then!!!

totten pushed a commit that referenced this pull request Sep 19, 2024
CRM_Event_Page_EventInfoTest::testFullMessage
Exception: CRM_Extension_Exception_MissingException: "Failed to find extension: civi_mail"
#0 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Extension/Container/Basic.php(143): CRM_Extension_Container_Basic->getRelPath("civi_mail")
#1 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Extension/Mapper.php(233): CRM_Extension_Container_Basic->getPath("civi_mail")
#2 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Core/Resources.php(261): CRM_Extension_Mapper->keyToBasePath("civi_mail")
#3 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Core/Resources.php(311): CRM_Core_Resources->getPath("civi_mail")
#4 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/Civi/Angular/Manager.php(208): CRM_Core_Resources->glob("civi_mail", (Array:3))
#5 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/Civi/Angular/Manager.php(114): Civi\Angular\Manager->resolvePatterns((Array:59))
#6 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check/Component/Env.php(1178): Civi\Angular\Manager->getModules()
#7 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check/Component.php(76): CRM_Utils_Check_Component_Env->checkAngularModuleSettings(FALSE)
#8 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check.php(215): CRM_Utils_Check_Component->checkAll((Array:0), FALSE)
civicrm#9 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check.php(185): CRM_Utils_Check::checkStatus()
civicrm#10 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check.php(93): CRM_Utils_Check::checkAll()
civicrm#11 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Core/Page.php(267): CRM_Utils_Check->showPeriodicAlerts()
civicrm#12 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Event/Page/EventInfo.php(325): CRM_Core_Page->run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants