*

kriskoyk

  • *****
  • 307 posts
Re: Repeat auto-republish.
« Reply #15 on: June 12, 2021, 09:01:32 PM »
Do we have control results?

*

MB Themes

Re: Repeat auto-republish.
« Reply #16 on: June 14, 2021, 08:45:43 AM »
@kriskoyk
Checked code.
This is from model to do updates in DB.
Code: [Select]
  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.
Code: [Select]
ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);
-> 284 is item id, then you have publish date, then expire date...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

kriskoyk

  • *****
  • 307 posts
Re: Repeat auto-republish.
« Reply #17 on: May 31, 2022, 06:24:10 PM »
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"?

*

MB Themes

Re: Repeat auto-republish.
« Reply #18 on: June 01, 2022, 10:17:55 AM »
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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots