auto-draft_to_publish bypass filters

Forums SNAP – WordPress Plugin Forums auto-draft_to_publish bypass filters

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #544239
    RacontTard
    Participant

      Hello,

      I’m using the PRO version of the plugin and I have an issue.

      When I manually publish a post (draft_to_publish), everything work fine. But when I try to auto-publish (auto-draft_to_publish), filters are not checked, logs write down “Unchecked Account” for every account (see below).

      Log :

      [2017-08-16 07:55:13] – [Skipped: Checkbox] [Facebook (Euro Deal Château-Gontier)] – -=[Unchecked Account]=- – PostID:3960
      [2017-08-16 07:55:13] – [Skipped: Checkbox] [Facebook (Euro Deal Colmar)] – -=[Unchecked Account]=- – PostID:3960
      [2017-08-16 07:55:13] – [Start =- ] – —===### NEW AUTO-POST REQUEST PostID:(3960) Immediate ###===—
      [2017-08-16 07:55:13] – [*** ID: 3960, Type: post] – Status Changed: auto-draft_to_publish. Autopost requested.

      [2017-08-16 07:41:45] – [Skipped: Checkbox] [Facebook (Euro Deal Colmar)] – -=[Unchecked Account]=- – PostID:3959
      [2017-08-16 07:41:45] – [Skipped: Filter – Network] [Facebook (Euro Deal Château-Gontier)] – Excluded – Post ID:(3959)
      Custom Field: custom_area_offer = Île-de-France | Actual: Nord-Pas-de-Calais
      Custom Field: custom_area_offer = National | Actual: Nord-Pas-de-Calais
      [2017-08-16 07:41:45] – [Start =- ] – —===### NEW AUTO-POST REQUEST PostID:(3959) Immediate ###===—
      [2017-08-16 07:41:45] – [*** ID: 3959, Type: post] – Status Changed: draft_to_publish. Autopost requested.

      What can/must I do to change this ?

      Thanks in advance

      #544449
      RacontTard
      Participant

        Found a solution by myself (thanks to NextScripts for their quick answer…), writing it down if people have similar problems.

        In the file inc/nxs_ntlist_class.php, at lines 282 and 283, change ‘0’ with ‘2’

        exactly :
        if (isset($pMeta[‘timeToRun’])) $optMt[‘timeToRun’] = $pMeta[‘timeToRun’]; $optMt[‘do’] = 0;
        if (isset($pMeta[‘do’])) $optMt[‘do’] = $pMeta[‘do’]; else { if (isset($pMeta[‘msgFormat’])) $optMt[‘do’] = 0; }

        to

        if (isset($pMeta[‘timeToRun’])) $optMt[‘timeToRun’] = $pMeta[‘timeToRun’]; $optMt[‘do’] = 2;
        if (isset($pMeta[‘do’])) $optMt[‘do’] = $pMeta[‘do’]; else { if (isset($pMeta[‘msgFormat’])) $optMt[‘do’] = 2; }

        But be very careful with this change, you’ll need to do it at every update and every post will go through filters !!

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.