• markmontes

    (@markmontes)


    Hi, I’m testing the plugin on local but any time i want to save changes for Text Settings, the panel display a critical error.

    https://drive.google.com/file/d/16ncPKxakOA2H1LIBcyzeYE8z-IUBlIQz/view?usp=sharing

    This is the debug log:

    [30-Mar-2021 21:11:13 UTC] PHP Fatal error:  Uncaught ValueError: Unknown format specifier "," in C:\xampp\htdocs\site\wp-content\plugins\my-calendar\my-calendar-settings.php:41
    Stack trace:
    #0 C:\xampp\htdocs\site\wp-content\plugins\my-calendar\my-calendar-settings.php(41): sprintf('March 30-%30, 2...', '<code>F j-%d, Y...')
    #1 C:\xampp\htdocs\site\wp-content\plugins\my-calendar\my-calendar-settings.php(725): mc_settings_field('mc_multidate_fo...', 'Date Format for...', 'F j-%d, Y', 'March 30-%30, 2...')
    #2 C:\xampp\htdocs\site\wp-includes\class-wp-hook.php(287): my_calendar_settings('')
    #3 C:\xampp\htdocs\site\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #4 C:\xampp\htdocs\site\wp-includes\plugin.php(484): WP_Hook->do_action(Array)
    #5 C:\xampp\htdocs\site\wp-admin\admin.php(259): do_action('my-calendar_pag...')
    #6 {main}
      thrown in C:\xampp\htdocs\site\wp-content\plugins\my-calendar\my-calendar-settings.php on line 41

    What i want to do is change the default Event title (Grid) value to{time}-{endtime}, I’m testing this on a multisite (not sure if this could produce the error).

    Does anyone have a similar issue?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    I don’t have any code that looks like that on line 41 of My Calendar; what version of My Calendar is this?

    Also, please provide the version of WordPress & PHP you’re using.

    Thread Starter markmontes

    (@markmontes)

    Hi Joe! thanks for reply, these are the versions i’m using:

    Wordpress: 5.6
    PHP: 8.0.3
    My Calendar: 3.2.17

    This is the line of code where error is being produced:

    $note = sprintf( $note, "<code>$value</code>" );

    I discovered that this error could be avoided deleting the value of “Date Format for multi-day events” field, when default value “F j-%d, Y” is deleted, text settings can be saved without display the error…

    Plugin Author Joe Dolson

    (@joedolson)

    Probably a PHP 8.0 issue; I haven’t done compatibility for PHP8 yet; it’s on the schedule for the next release.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Saving custom text on settings panel got a critical error’ is closed to new replies.