• Resolved saveatrain

    (@saveatrain)


    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot declare class api_client, because the name is already in use in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/the-holiday-calendar/clients/api-client.class.php on line 2

    this is what happened to me when i tried to load the plugin,
    do you know what caused this?

    thanks in advance,

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

Viewing 15 replies - 16 through 30 (of 72 total)
  • Thread Starter saveatrain

    (@saveatrain)

    I updated the plugin.
    https://www.saveatrain.com/blog/holiday-calendar-planner/

    but
    1. i think the country pick is not correct, it should be on the top right of the calendar
    2. i didn’t understand where i should insert the css? (An idea i think it would be to change the design to everyone like on your site, since your design is very UI friendly)
    3. is there a way to enter the head part only for a specific page in wordpress?

    Plugin Author mva7

    (@mva7)

    Hi,

    we see some small issues with the plugin on your site. Will fix them today.

    Concerning the CSS and font link. This is something you guys should pick up.

    Thanks!

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    the css is not something you want to add for all clients? if its a nicer visual, why not make it permanent?

    Plugin Author mva7

    (@mva7)

    Hi,

    this is unfortunately impossible because we need to adapt our CSS to the CSS of the used theme.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    i see, where do you want us to implement the css, inside your plugin css once its installed just edit it through ssh?

    Plugin Author mva7

    (@mva7)

    Hi,

    Guess a CSS plugin will suffice. That will enable you to insert additional CSS. Our CSS is safe to load on every page.

    For the <head> part there are also plugins available.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    ok i will wait for your update on the plugin,

    i did see that when you move country, the holiday calendar stays the same, i guess to this you were refering on the things you had to fix

    Plugin Author mva7

    (@mva7)

    Hi,

    yes. We did not encounter this in our tests so we need to predict why it fails on your site and come up with a potential fix.

    Regards,

    Mva7

    Plugin Author mva7

    (@mva7)

    Hi,

    we think we identified the problem. It is not allowed to use cache on the page(s) that contain the plugin if you use the country drop down. This is because the calendar is rendered on the server side.

    Is it possible to make an exception for this page in your cache settings?

    Thanks!

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    thats impossible, but look at our page https://www.saveatrain.com/blog/timezone/
    it has many things which are server based, and that page is cached.

    we have on our side varnish + autoptimize + wp-optimize
    and we have 77 plugins working on our wordpress

    Plugin Author mva7

    (@mva7)

    Hi,

    ok in that case we need to investigate further. Will give an update soon.

    Thank you.

    Regards,

    Mva7

    Plugin Author mva7

    (@mva7)

    Hi,

    can you try 1.17.2. We added some tweaks.

    Thanks!

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    i updated the plugin,
    what did you update so i can check, or you want to check from your end?

    Plugin Author mva7

    (@mva7)

    Hi,

    we are clueless. Can you put this on line 343 of the-holiday-calendar.php:

    //temp
    echo "<!-- thc debug:";
    print_r($_COOKIE);
    echo "-->";

    Thanks!

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    1. i added your request in row 343 but it broke my admin so i had to revert
    this is where i added it

    $displayMode = isset($atts[‘displaymode’]) && strtolower($atts[‘displaymode’]) == ‘calendar’ ? 1 : 0;
    $includeHolidays = isset($atts[‘showholidays’]) && strtolower($atts[‘showholidays’]) == ‘yes’ ? true : false;
    $allowUserToChangeCountry = isset($atts[‘changecountry’]) && strtolower($atts[‘changecountry’]) == ‘yes’ ? true : false;
    $countryIso = NULL;
    if($allowUserToChangeCountry && isset($_COOKIE[‘thc_selected_holiday_country’]))
    {
    $countryIso = $_COOKIE[‘thc_selected_holiday_country’];
    }
    //temp
    echo "<!– thc debug:";
    print_r($_COOKIE);
    echo "–>";

    else
    {
    $countryIso = isset($atts[‘country’]) ? $atts[‘country’] : ‘us’;
    }

    2. secondly, we also have vanrish on our site, so maybe we need to allow the cookie you are trying to implement, look at some of the varnish definitions to allow cookies to pass through the proxy

    this is from varnish.vcl file

    set req.http.Cookie = regsuball(req.http.Cookie, “__utm.=[^;]+(; )?”, “”);
    set req.http.Cookie = regsuball(req.http.Cookie, “_ga=[^;]+(; )?”, “”);
    set req.http.Cookie = regsuball(req.http.Cookie, “_gat=[^;]+(; )?”, “”);

Viewing 15 replies - 16 through 30 (of 72 total)
  • The topic ‘Fatal error’ is closed to new replies.