Osclass Support Forums
Osclass plugin support => Backoffice Manager Plugin => Topic started by: kriskoyk on December 29, 2020, 01:02:46 PM
-
After the first auto-republish it goes back to "Disabled", while I put the ad to play 20 times
-
@kriskoyk
Can you please provide more details?
-
I set the auto-republish to be done 20 times. The first auto-republisht is made and then the indication is "Disabled" and no new auto-republish is made.
-
Do we have news about the problem?
-
New remark: I have an ad for 5 days and I put the ad for automatic renewal 20 times. After 5 days, the first update is done automatically and then the selection was automatically changed to "Disabled" resulting in the cessation of automatic republishing. With "Disabled" in its place, I changed the ad to "Premium" and after 5 days the ad was automatically reposted
I do not know what is happening and I can not solve the problem.
-
@kriskoyk
Do you have requirement user must valdiate it's listing?
-
No, it is not checked
-
@kriskoyk
Reviewed plugin and there is just one setting that can change if item is active or no:
When listing is republished, validation by admin is required (3)
If you enable it, listing will be republished as inactive for re-validation purpose.
-
It was not checked. I will check it to try this too. (If it works this way, the administrator will need to validate all reposted ads. Can it work without requiring administrator validation?)
-
Remember also that after the first renewal while I had put "30 times" she went to "Disabled" .
-
It was not checked. I will check it to try this too. (If it works this way, the administrator will need to validate all reposted ads. Can it work without requiring administrator validation?)
Yes, it must be unchecked.
-
Probably with my bad English the problem was not understood.
I describe it again:
Ad validation requirement is not enabled everywhere.
For the renewal I put 30 times.
The refresh is done once at the end of the ad.
The new indication for renewal is deactivated immediately and no further renewal takes place.
-
@kriskoyk
Oki, so our problem is:
- you setup republish XY times
- first republish works well, but:
- after first republish, instead of having 29 other republishes, data in plugin are corrupted and you got no other republish
Is that right?
-
-Yes right, after first republish, instead of having 29 other republishes, the box looks "disabled" and do not make the other 29 posts
-
Thank you, will check it out.
-
Do we have control results?
-
@kriskoyk
Checked code.
This is from model to do updates in DB.
public function republish_times( $item_id ) {
return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_times=coalesce(republish_times, 0)+1 WHERE item_id='.$item_id);
}
public function republish_auto( $item_id ) {
return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_auto=coalesce(republish_auto, 0)-1 WHERE item_id='.$item_id);
}
It looks OK.
You can test republish by adding this code i.e. to theme functions.php and refreshing page.
ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);
-> 284 is item id, then you have publish date, then expire date...
-
This problem that I have not solved yet let's try to solve. This code-ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);-, that I have to put, that I find "theme functions.php" and "refreshing page"?
-
I recommend not go into code changes if you are not sure what to do, use only plugin functions.
If you believe this is bug, create support ticket and provide details how to reproduce.