• Hello,

    I’m unable to save my custom templates as I’m getting:

    ERROR – Save Failed. Error writing contents to file: amazon-associates-link-builder/template/….

    Reading this I thought I need to set permissions to the folder template? But it still is not working.

    Beyond that is the location update safe, I mean after an plugin update are my custom templates preserved?

    Cheers
    Yogie

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Amazon Associates Link Builder

    (@amazonlinkbuilder)

    Dear @yogieanamcara,
    Regarding your question “after a plugin update are my custom templates preserved?”
    Yes

    For solving the issue in Saving custom template please update to latest plugin version first and if that doesn’t solve the issue, please answer the following to help us to debug the issue:
    1. Browser version on which you are facing the issue.
    2. Does the issue occur on all browsers or only a specific browser?
    3. PHP version (You can use plugins like display PHP version that display your PHP version on the WordPress dashboard)
    4. WordPress version
    5. Steps to reproduce the issue
    6. PHP error logs
    7. List of plugins installed on your system
    8. Operating System version(OS version).
    9. Web Server used(Apache, nginx or IIS)
    10. Browser console log error (if any) generated at the time of the error. Steps to get the console logs:

    • Open the Console window in Chrome using Ctrl + Shift + J (or Cmd + Opt + J on Mac) Follow this for reference.
    • Hit the Save button and check the console log errors
    • Send us the console log as it is. The easiest way is if you can send us a screenshot of the complete console log error list.

    Plugin Author Amazon Associates Link Builder

    (@amazonlinkbuilder)

    Dear @yogieanamcara,

    Since we didn’t get any response from you, we hope that your problem is resolved. Please feel free to reopen the thread with details asked in the last comment in case of the issue still persists.

    Thread Starter YogieAnamCara

    (@yogieanamcara)

    Unfortunately, the error still persists. The server log is not showing any messages that would explain the issue. Also Chrome is not showing anything.

    I have the same problem, and I maybe found the cause of this bug.

    ==========Quote from Line 245 in aalb_helper.php,==========
    public function aalb_get_uploads_dir_path() {
        global $wp_filesystem;
        $upload_dir = wp_upload_dir();
    
        //TODO: Reason for not using directly use $upload_dir['basedir'] instead of calling find_folder
        return $wp_filesystem->find_folder( $upload_dir['basedir'] );
    }
    ============================================================

    In a certain situation, $wp_filesystem->find_folder( $upload_dir[‘basedir’] ) returns NULL.
    (e.g. When we use define(‘FS_METHOD’, ‘ftpsockets’); in wp-config.php etc)
    That’s why AALB plugin tries to save template file on WRONG path, and fails.

    I hope Amazon developers to solve this “TODO: Reason for not using directly use $upload_dir[‘basedir’] instead of calling find_folder”.

    Thank you in advance.

    Plugin Author Amazon Associates Link Builder

    (@amazonlinkbuilder)

    Dear @takamu,

    Thanks a lot for providing this information. We have added this to our known bugs list and will update you once we fix the same.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ERROR – Save Failed. Error writing contents to file’ is closed to new replies.