Pending

User tests: Successful: Unsuccessful:

avatar kartikeyg0104
kartikeyg0104
19 Sep 2025

Summary of Changes

This pull request fixes an issue in the SmartSearch indexer where fields like publish_end_date were not being updated to NULL in the database when the corresponding publish_down date was removed from an article. The root cause was the missing $updateNulls parameter in the $db->updateObject() method call, which prevents NULL values from being updated in the database.

The fix includes:

  • Adding the $updateNulls parameter set to true in the $db->updateObject() method call.

Testing Instructions

  1. Before applying the fix:

    • Create an article with no publish_down date → Index is correct.
    • Add a publish_down date → Index updates with the new date.
    • Remove the publish_down date → Index retains the old publish_end_date value.
  2. After applying the fix:

    • Create an article with no publish_down date → Index is correct.
    • Add a publish_down date → Index updates with the new date.
    • Remove the publish_down date → Index correctly updates publish_end_date to NULL.

Actual Result BEFORE applying this Pull Request

  • Articles with removed publish_down dates still retain the old publish_end_date in the index.

Expected Result AFTER applying this Pull Request

  • Articles with removed publish_down dates have their publish_end_date properly updated to NULL in the database.
avatar kartikeyg0104 kartikeyg0104 - open - 19 Sep 2025
avatar kartikeyg0104 kartikeyg0104 - change - 19 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Sep 2025
Category Administration com_finder
avatar brianteeman
brianteeman - comment - 20 Sep 2025

It is expected that you test your work BEFORE submitting a PR

You can not have tested this PR as as soon as it is applied you are not able to save any article

I appreciate that you want to contribute but PLEASE respect the time of everyone else by not submitting untested code

avatar richard67
richard67 - comment - 20 Sep 2025

System tests are failing for the same reason.

avatar Serge-45
Serge-45 - comment - 21 Sep 2025

@kartikeyg0104 : the syntax simplification you added on the ternary operator lines is forcing a cast to int of the fields. That could be the reason for the fail. A syntax simplification here is probably not needed.

Add a Comment

Login with GitHub to post a comment