? bug PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
12 Jun 2023

Pull Request for Issue (#40741 (comment)) .

Summary of Changes

set 0 for hits on new item

Testing Instructions

use postgresql to replicate
create a newsfeed

Actual result BEFORE applying this Pull Request

error on postgresql

Expected result AFTER applying this Pull Request

mysql & postgresql both work

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

avatar joomla-cms-bot joomla-cms-bot - change - 12 Jun 2023
Category Administration com_newsfeeds
avatar alikon alikon - open - 12 Jun 2023
avatar alikon alikon - change - 12 Jun 2023
Status New Pending
avatar Kaushik1216 Kaushik1216 - test_item - 13 Jun 2023 - Tested successfully
avatar Kaushik1216
Kaushik1216 - comment - 13 Jun 2023

I have tested this item successfully on 74784d9


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

avatar laoneo laoneo - test_item - 13 Jun 2023 - Tested successfully
avatar laoneo
laoneo - comment - 13 Jun 2023

I have tested this item successfully on 74784d9


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

avatar laoneo laoneo - change - 13 Jun 2023
Status Pending Ready to Commit
avatar laoneo
laoneo - comment - 13 Jun 2023

RTC


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

avatar wilsonge
wilsonge - comment - 13 Jun 2023

Does this mean we are not calling check on new items?

avatar wilsonge wilsonge - change - 14 Jun 2023
Status Ready to Commit Information Required
avatar HLeithner
HLeithner - comment - 15 Jun 2023

Does this mean we are not calling check on new items?

I looked at the execution pipeline and it should trigger the check function in AdminModel::save() at line 1251.

btw. all other components I checked use the check function to set the hit count so this pr is not the best way to fix it.

avatar richard67
richard67 - comment - 15 Jun 2023

Does this mean we are not calling check on new items?

I looked at the execution pipeline and it should trigger the check function in AdminModel::save() at line 1251.

btw. all other components I checked use the check function to set the hit count so this pr is not the best way to fix it.

Hmm, maybe the if (is_null($this->hits)) in the check function is the problem? Maybe it should be an if (!isset($this->hits))?
Forget it, thinking about it that should not be the case.

avatar laoneo
laoneo - comment - 16 Jun 2023

Didn't realize that the code was moved out of the check function. I would say that if (!$this->hits) is enough in the check function. @alikon can you revert the change and update the original if statement to not catch NULL values only?

avatar wilsonge
wilsonge - comment - 16 Jun 2023

update the original if statement to not catch NULL values only

If you do that you'll reset the hits every time you update the item. Postgres presumably isn't treating the value as null or something?

avatar laoneo
laoneo - comment - 16 Jun 2023

I didn't mean every not null value, if you read my whole comment then I do suggest something like `if (!$this->hits)

avatar alikon alikon - change - 16 Jun 2023
Labels Added: bug PR-4.3-dev
avatar alikon
alikon - comment - 16 Jun 2023

anyway...

check now please ?

avatar laoneo laoneo - test_item - 17 Jun 2023 - Tested successfully
avatar laoneo
laoneo - comment - 17 Jun 2023

I have tested this item successfully on 5a19dc0

Newsfeed can be added on postgres


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

avatar laoneo
laoneo - comment - 17 Jun 2023

@Kaushik1216 can you test this one again?

avatar Kaushik1216 Kaushik1216 - test_item - 17 Jun 2023 - Tested successfully
avatar Kaushik1216
Kaushik1216 - comment - 17 Jun 2023

I have tested this item successfully on 5a19dc0


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

avatar alikon alikon - change - 17 Jun 2023
Status Information Required Ready to Commit
avatar alikon
alikon - comment - 17 Jun 2023

RTC


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

avatar obuisard obuisard - close - 17 Jun 2023
avatar obuisard obuisard - merge - 17 Jun 2023
avatar obuisard obuisard - change - 17 Jun 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-06-17 17:01:12
Closed_By obuisard
Labels Added: ?
avatar obuisard
obuisard - comment - 17 Jun 2023

Thank you Nicola @alikon !

Add a Comment

Login with GitHub to post a comment