• Resolved Samuel Aguilera

    (@samuelaguilera)


    After upgrading to 3.1.3, the date and time placeholders for the backup file stops working.

    For example:

    backwpup_%Y-%m-%d_%H-%i-%s

    Shows in the preview below the filename input like this:

    Preview: backwpup_2014-11-14_16-42-34.zip

    But the actual filename is created with:

    backwpup_Y-m-d_H-i-s.zip

    Same issue in many updgraded sites.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter Samuel Aguilera

    (@samuelaguilera)

    After looking into inc/class-job.php fixed myself.

    In function generate_filename changed this:

    $name = str_replace( $datevars, $datevalues, sanitize_file_name( $name ) );
    $name .= $suffix; //prevent _ in extension name that sanitize_file_name add.

    To:

    $name = str_replace( $datevars, $datevalues, $name );
    $name = sanitize_file_name( $name ) . $suffix; //prevent _ in extension name that sanitize_file_name add.

    Simply reverting the code change from 3.1.3 to 3.1.2 for that function.

    I confirm.

    I have the same problem on all installations BackWPup v3.1.3
    I hope that this will be fixed in the next version.

    Unfortunately, your suggested fix does not work for me.

    I have confirmed that the two lines in the generate_filename function have been changed. I also deactivated and reactivated the plugin, but the placeholders are stil being replaced with hyphens.

    I have fixed it and release an update asap.

    can you share the fix ? no available on github ?

    Thread Starter Samuel Aguilera

    (@samuelaguilera)

    sireneweb, you can use the fix I have posted in the meantime. It works.

    Thanks i didn’t see that ?? ooops it’s my fault

    i try but no effect for me

    “I have fixed it and release an update asap.”

    Thanks, Daniel. I’ll keep an eye out for the update.

    You also need to fix your jobs. see archive name

    Thread Starter Samuel Aguilera

    (@samuelaguilera)

    For me it works simply doing the code change commented above.

    Here is the whole file content if you want to replace inc/class-job.php file.

    When a job is edited and then saved the result is changed from “%” to “-“

    You have to edit …_options “table” look for backwpup_jobs record
    edit and search and replace e.g. “-Y-m-d-H-m-s” replace with “%Y%m%d%H%m%s”

    * do not change the length of the string

    Thread Starter Samuel Aguilera

    (@samuelaguilera)

    FranckD, I was not facing that problem because I already have my jobs names saved (before the upgrade). But tried to edit and save the job and find your issue.

    You need to make a little change in inc/class-page-editjob.php, see change here. And you can grab the whole file here.

    After that, you can save your name without loosing date/time placeholders.

    Release 3.1.4 is out with a fix.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Date and time placeholders stops working after upgrading’ is closed to new replies.