User tests: Successful: Unsuccessful:
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:
$updateNulls
parameter set to true
in the $db->updateObject()
method call.Before applying the fix:
publish_down
date → Index is correct.publish_down
date → Index updates with the new date.publish_down
date → Index retains the old publish_end_date
value.After applying the fix:
publish_down
date → Index is correct.publish_down
date → Index updates with the new date.publish_down
date → Index correctly updates publish_end_date
to NULL
.publish_down
dates still retain the old publish_end_date
in the index.publish_down
dates have their publish_end_date
properly updated to NULL
in the database.Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_finder |
System tests are failing for the same reason.
@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.
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