• Resolved jdh573

    (@jdh573)


    I am using WordPress on an inhouse NAS hence no Link. I am trying to change the Uploaded On field to better reflect the date of the event the images are related to.
    1. I can bulk change other fields such as Alt. Text
    2. I can change the Uploaded On using Quick Edit
    3. When I used bulk edit for Uploaded On (2021-04-24) I get the dreaded Ajax error

    An ajax.fail error has occurred. Please reload the page and try again. (error), jqXHR( 500, Internal Server Error, <p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>)

    I am using the Travel Diaries Theme and Modula Gallery plugin nothing else. WordPress v6.0.1, PHP v7.3.7

    Help appreciated

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report. I have just run a quick test on my system and bulk changing the uploaded date is working there (with PHP version 8.0.9). I don’t think the PHP version matters but I can try another test using PHP 7.0.27 or 7.4.4 later.

    I used your format, “2021-04-24” and also slashes, “2021/04/24”; both work.

    Is there any additional information in the error log? You should be able to see it by navigating to the Settings/Media Library Assistant Debug tab.

    Thanks for any additional details you can provide.

    Thread Starter jdh573

    (@jdh573)

    David,
    Thanks for your reply. A bit more detail. I am using a QNAP NAS and WordPress is installed within a container station. This could be part of the problem.
    The Debug settings are;

    Debug Settings
    Display Limit	131072
    Debug File	
    Replace PHP log	
    PHP Reporting	0x7FFF
    MLA Reporting	3
    MLA_DEBUG_LEVEL	0x0001
    PHP error_reporting	0x7FFF
    Old PHP error_log	/var/www/html/WordPress/wp-content/debug.log
    New PHP error_log	/var/www/html/WordPress/wp-content/debug.log
    WP_DEBUG	true
    WP_DEBUG_LOG	true
    WP_DEBUG_DISPLAY	true
    WP_CONTENT_DIR	/var/www/html/WordPress/wp-content

    When I check the debug log the tab indicates;

    The Errpr Log;

    [30-Jul-2022 03:38:48 UTC] 694 MLACore::mla_plugins_loaded_action() MLA 3.01 () mla_debug_level 0x3
    [30-Jul-2022 03:39:34 UTC] 694 MLACore::mla_plugins_loaded_action() MLA 3.01 () mla_debug_level 0x3
    [30-Jul-2022 03:39:54 UTC] 694 MLACore::mla_plugins_loaded_action() MLA 3.01 () mla_debug_level 0x3
    [30-Jul-2022 03:39:54 UTC] 37 MLA_Ajax::initialize( false ) $_REQUEST = array (
      'action' => 'mla-inline-edit-scripts',
      'mla_admin_nonce' => 'b0cdaaab5f',
      'bulk_action' => 'bulk_edit',
      'cb_offset' => '0',
      'cb_count' => '3',
      'cb_attachment' => 
      array (
        0 => '853',
        1 => '852',
        2 => '851',
      ),
      'tax_input' => 
      array (
        'attachment_category' => 
        array (
          0 => '0',
        ),
        'attachment_tag' => '',
      ),
      'search-attachment_category' => 'Search Att. Categories',
      'tax_action' => 
      array (
        'attachment_category' => 'add',
        'attachment_tag' => 'add',
      ),
      'post_title' => '',
      'post_excerpt' => '',
      'post_content' => '',
      'image_alt' => '',
      'post_date' => '2021/04/14',
      'post_parent' => '',
      'post_author' => '-1',
      'comment_status' => '-1',
      'ping_status' => '-1',
      'page' => 'mla-menu',
      'screen' => 'media_page_mla-menu',
    )
    [30-Jul-2022 03:39:54 UTC] 1299 MLA::mla_process_bulk_action( edit ) request = array (
      'action' => 'mla-inline-edit-scripts',
      'mla_admin_nonce' => 'b0cdaaab5f',
      'bulk_action' => 'bulk_edit',
      'cb_offset' => '0',
      'cb_count' => '3',
      'cb_attachment' => 
      array (
        0 => '853',
        1 => '852',
        2 => '851',
      ),
      'tax_input' => 
      array (
        'attachment_category' => 
        array (
          0 => '0',
        ),
        'attachment_tag' => '',
      ),
      'search-attachment_category' => 'Search Att. Categories',
      'tax_action' => 
      array (
        'attachment_category' => 'add',
        'attachment_tag' => 'add',
      ),
      'post_title' => '',
      'post_excerpt' => '',
      'post_content' => '',
      'image_alt' => '',
      'post_date' => '2021/04/14',
      'post_parent' => '',
      'post_author' => '-1',
      'comment_status' => '-1',
      'ping_status' => '-1',
      'page' => 'mla-menu',
      'screen' => 'media_page_mla-menu',
      'bulk_edit' => 'Update',
      'mla_bulk_action_do_cleanup' => true,
    )
    [30-Jul-2022 03:39:54 UTC] PHP Fatal error:  Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (10) in /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php:1066
    Stack trace:
    #0 /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php(1066): DateTimeZone->__construct('10')
    #1 /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php(1376): MLA::mla_prepare_bulk_edits('853', Array, Array)
    #2 /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php(1867): MLA::mla_process_bulk_action('edit')
    #3 /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php(1888): MLA::_bulk_edit_ajax_handler()
    #4 /var/www/html/WordPress/wp-includes/class-wp-hook.php(307): MLA::mla_inline_edit_ajax_action('')
    #5 /var/www/html/WordPress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #6 /var/www/html/WordPress/wp-includes/plugin.php(476): WP_Hook- in /var/www/html/WordPress/wp-content/plugins/media-library-assistant/includes/class-mla-main.php on line 1066
    [30-Jul-2022 03:40:10 UTC] 694 MLACore::mla_plugins_loaded_action() MLA 3.01 () mla_debug_level 0x3
    [30-Jul-2022 03:40:12 UTC] 694 MLACore::mla_plugins_loaded_action() MLA 3.01 () mla_debug_level 0x3
    Thread Starter jdh573

    (@jdh573)

    In addition because QNAP uses the Container Station calls are made in an indirect referral eg.
    define( ‘WP_DEBUG’, !!getenv_docker(‘WORDPRESS_DEBUG’, ‘1’) );
    I am not sure if this would affect MLA in any way since all plugin installs are made within the container.

    Cheers

    Thread Starter jdh573

    (@jdh573)

    Solution. Use City based Timezone setting in General Settings. Manual UTC+10 (for Eastern Standard Time) not recognised?
    Bulk update of Updated On is now working.

    Cheers John

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your posts with the additional information and especially for finding a solution to the timezone problem. Without the error log details it would have taken a long time to get to the root cause of the error.

    I will see if I can improve the MLA code to prevent the problem for other users. I am leaving this topic resolved, but please update it if you have any problems or further questions regarding the Uploaded on editing. Thanks for your interest in MLA.

    Plugin Author David Lingren

    (@dglingren)

    I have made some code changes to properly handle Timezone settings with a positive UTC offset value, e.g., “UTC+10” for Eastern Standard Time. The fix will be in my next MLA version.

    Thanks for alerting me to this MLA defect!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to change Uploaded On in Bulk Edit’ is closed to new replies.