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

Don't perform event timezone check if CiviEvent is disabled #22898

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

MegaphoneJon
Copy link
Contributor

Overview

The new timezone check in 5.47 fails if you don't have CiviEvent enabled.

Before

API Exception: Event API is not available because CiviEvent component is disabled while checking events for timezones. in System Status.

After

No error.

Comments

This error message was impressively accurate for being dynamically generated, well done APIv4.

@civibot
Copy link

civibot bot commented Mar 7, 2022

(Standard links)

@civibot civibot bot added the 5.48 label Mar 7, 2022
* @inheritDoc
*/
public function isEnabled() {
CRM_Core_Component::isEnabled('CiviEvent');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense - same as the CiviCase one. But needs a return statement though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MegaphoneJon not sure if you saw my comment yesterday - this just needs a return in front and then is mergeable.

Suggested change
CRM_Core_Component::isEnabled('CiviEvent');
return CRM_Core_Component::isEnabled('CiviEvent');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I missed it. Will fix tomorrow.

@seamuslee001
Copy link
Contributor

looks right to me MOP

@mattwire mattwire merged commit cc760f3 into civicrm:5.48 Mar 9, 2022
@demeritcowboy
Copy link
Contributor

Have added backport to 5.47 at #22924

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

Successfully merging this pull request may close these issues.

4 participants