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.1] DateTime: Don't convert when there is no user #43521

Merged
merged 1 commit into from
May 26, 2024

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented May 24, 2024

Pull Request for Issue #43511 .

Summary of Changes

When you have a custom field set to be indexed in Smart Search and run that indexing process in the CLI, it will fail because the CLI process doesn't have a user object. The failure happens in the HTMLHelper::date() method and this PR simply checks if there is a user object to get the timezone from.

Testing Instructions

  1. Create a custom field of type calendar for your articles and set it to be indexed by Smart Search
  2. Run php cli/joomla.php finder:index on the command line

Actual result BEFORE applying this Pull Request

Fatal error in HTMLHelper::date()

Expected result AFTER applying this Pull Request

Indexing works as expected.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@ceford
Copy link
Contributor

ceford commented May 24, 2024

I have tested this item ✅ successfully on b031b01


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43521.

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on b031b01


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43521.

@Quy
Copy link
Contributor

Quy commented May 24, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43521.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 24, 2024
@pe7er pe7er self-assigned this May 26, 2024
@bembelimen bembelimen merged commit 745cef8 into joomla:5.1-dev May 26, 2024
4 checks passed
@bembelimen
Copy link
Contributor

Thx

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 26, 2024
@bembelimen bembelimen added this to the Joomla! 5.1.1 milestone May 26, 2024
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.

None yet

7 participants