The token has a Y-m-d format.
I am using a d-m-Y format for my Dutch site.

Is it possible to change the date format to a date-time setting from admin/config/regional/date-time. Maybe by adding a new node expire format Y-m-d/d-m-Y and take that for the token?

Comments

Anonymous’s picture

cmseasy created an issue. See original summary.

Nafes’s picture

cmseasy, do you use 7.x-2.x version of Node expire with adjustable expiry date format? If so, I probably need to make 7.x-2.x version of this module or just to put token functionality to 7.x-2.x version of Node expire.

Anonymous’s picture

I use 7.x-1.8.
I will try 7.x-2.x and give my feedback here. Thanks for the hint.

Anonymous’s picture

After updating to node_expire 7.x-2.x the first impression is ok. After changing the date to d-m-Y I have the correct date format in the flag text and flag notice tokens.

I am using rules and the flag module to update the expired date (the rule adds a month from now). This is working fine in node_expire 7.x-1.8.

With 7.x-2.x i get the error:
Notice: Use of undefined constant NODE_EXPIRE_FORMAT - assumed 'NODE_EXPIRE_FORMAT' in NodeExpireExtras\NodeExpireDateHelper::extendExpireDate() (regel 166 van /home/dev/domains/dev-cmseasy.nl/public_html/groeninfo/sites/all/modules/node_expire_extras/includes/node_expire_extras.inc).
when I use the flag (rule) 'update expire date with 1 month'.

My rule, as I said works fine in 1.8:

{ "rules_verleng_prikbord_advertentie" : {
    "LABEL" : "Verleng prikbord advertentie",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "TAGS" : [ "Prikbord" ],
    "REQUIRES" : [
      "node_expire_extras",
      "node_expire",
      "rules",
      "rules_scheduler",
      "flag"
    ],
    "ON" : {
      "flag_flagged_verleng_prikbord_publicatie" : [],
      "flag_unflagged_verleng_prikbord_publicatie" : []
    },
    "DO" : [
      { "node_expire_extras_update_expire" : { "node" : [ "flagged-node" ] } },
      { "node_expire_unset_expired" : { "node" : [ "flagged-node" ] } },
      { "node_publish" : { "node" : [ "flagged-node" ] } },
      { "schedule_delete" : { "component" : "rules_node", "task" : "Unpublish node [node:nid]" } }
    ]
  }
}
Nafes’s picture

cmseasy, thank you for the feedback. It helped me to understand the problem. I will make a 7.x-2.x version of this module, which will work in couple with 7.x-2.x Node expire. It shouldn't take a lot of time.

  • Nafes committed 2c5b92e on 7.x-2.x
    Issue #2551843: Created 7.x-2.x pre-release version of the module.
    

  • Nafes committed a1430be on 7.x-2.x
    Issue #2551843 by Nafes: Fixed dependency on Node expire.
    
Nafes’s picture

cmseasy, please try 7.x-2.x-dev branch. If it is OK, I will make a release. Before testing please update Node expire to 7.x-2.1 - this is a dependency requirement.

Anonymous’s picture

Hi Nafes

Testing this on my test- and on my dev server: perfect!
No errors or other issues found.
Thanks.

Martin

Nafes’s picture

Status: Active » Fixed

Hi Martin,

Thank you. I am glad that everything is working well. I made a 7.x-2.0 release. Do not worry that it is in yellow color - I just don't want to force to update people, who are OK with 7.x-1.x. Good luck in your projects!

Kind regards,
Nik

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.