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

Fix issue with dispatching allowRoutes event #2

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

seamuslee001
Copy link

@totten
Copy link
Owner

totten commented Jan 29, 2024

Thanks @seamuslee001. Makes sense to me.

@totten totten merged commit 3f6942f into totten:master-oembed Jan 29, 2024
@seamuslee001 seamuslee001 deleted the master-oembed branch January 29, 2024 03:06
totten pushed a commit that referenced this pull request Feb 16, 2024
[PHP Deprecation] explode(): Passing null to parameter #2 ($string) of type string is deprecated at /var/www/powerbase/sites/all/modules/civicrm/CRM/Utils/Mail/EmailProcessor.php:83
totten pushed a commit that referenced this pull request Apr 9, 2024
…f type array, null given a CRM_Core_DAO->copyValues()
totten pushed a commit that referenced this pull request Apr 9, 2024
Fix for `TypeError: array_key_exists(): Argument #2 ($array) must be …
totten pushed a commit that referenced this pull request Sep 5, 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")
civicrm#3 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Core/Resources.php(311): CRM_Core_Resources->getPath("civi_mail")
civicrm#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))
civicrm#5 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/Civi/Angular/Manager.php(114): Civi\Angular\Manager->resolvePatterns((Array:59))
civicrm#6 /home/homer/buildkit/build/build-3/web/sites/all/modules/civicrm/CRM/Utils/Check/Component/Env.php(1178): Civi\Angular\Manager->getModules()
civicrm#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)
civicrm#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()
totten added a commit that referenced this pull request Mar 7, 2025
In E2E\AfformMock\MockPublicFormTest, it attempts to submit form as an
anonymous user. On a new/clean instance of D9/D10 with php83, the test fails
consistently.

BEFORE:

The submission is rejected. In the Drupal log, we see a corresponding error:

TypeError: CRM_Utils_System_Drupal8::isMaintenanceMode(): Return value must be of type bool, null returned in CRM_Utils_System_Drupal8->isMaintenanceMode() (line 1023 of /home/totten/bknix/build/build-0/src/civicrm-core/CRM/Utils/System/Drupal8.php).

- #0 /home/totten/bknix/build/build-0/src/civicrm-core/CRM/Utils/System.php(1952): CRM_Utils_System_Drupal8->isMaintenanceMode()
- #1 /home/totten/bknix/build/build-0/src/civicrm-core/CRM/Api4/Page/AJAX.php(28): CRM_Utils_System::isMaintenanceMode()
- #2 /home/totten/bknix/build/build-0/src/civicrm-core/CRM/Core/Invoke.php(278): CRM_Api4_Page_AJAX->run(Array, NULL)
- civicrm#3 /home/totten/bknix/build/build-0/src/civicrm-core/CRM/Core/Invoke.php(73): CRM_Core_Invoke::runItem(Array)

AFTER: It's ok.

TECHNICAL DETAILS:

On a new/clean system, the content of `system.maintenance_mode` appears to be `NULL`.

The bug is likely hard to see in manual testing because:

1. A lot of manual testing is done as admin user (who can bypass maintence-mode checks).
2. After you've toggled maintenance-mode for the first, the value becomes `0` or `1`.
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.

2 participants