• 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 - 31 through 45 (of 72 total)
  • Plugin Author mva7

    (@mva7)

    Hi,

    make sure it is before the }

    if($allowUserToChangeCountry && isset($_COOKIE['thc_selected_holiday_country']))
    {			
    	$countryIso = $_COOKIE['thc_selected_holiday_country'];
    	
    	//temp
    	echo "<!-- thc debug:";
    	print_r($_COOKIE);
    	echo "-->";
    }

    Regards,

    Mva7

    Plugin Author mva7

    (@mva7)

    Now reading the part about the cookie, ours is called: thc_selected_holiday_country

    Make sure it is allowed.

    Thanks!

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    actually since i am logged in user, i do not need cookie setup.

    i have an idea for you, why don’t you use Transients, its the way most wordpress dev are doing

    Plugin Author mva7

    (@mva7)

    Hi,

    Nice tip. Will investigate it and release a new version asap.

    Regards,

    Mva7

    Plugin Author mva7

    (@mva7)

    Hi,

    quick update. We expect to deliver a new version on thursday or friday.

    Thanks for your patience.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    awesome, thanks for the update

    Plugin Author mva7

    (@mva7)

    Hi,

    version 1.17.3 is now available.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    i updated it and i don’t think its working when i change a country

    Plugin Author mva7

    (@mva7)

    Hi,

    we now use PHP sessions. That means that the PHPSESSID cookie must be allowed. Transients were not suitable because it would give the same country for all visitors.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    this is a sample row for varnish configuration for Google analytics cookie.
    set req.http.Cookie = regsuball(req.http.Cookie, “_ga=[^;]+(; )?”, “”);

    what should be the line for you?

    Plugin Author mva7

    (@mva7)

    Hi,

    we have no experience with Varnish and we wouldn’t want to advise something that will break your site.

    In retrospect it would have been better to offer a non persistent option that will always work. We will make that available tonight. It means the selection will reset if you go to another page but at least you can select all countries.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    thanks,
    if you also edit this, can you please also edit the css design like on your site,
    the current design is not ux friendly,
    i think all of your users will be happy for a design uplift ??

    as for the cookie, what is the name of your cookie _PHPSESSID or PHPSESSID or something else?

    Plugin Author mva7

    (@mva7)

    Hi,

    it is called PHPSESSID. It is a default cookie from PHP.

    Regards,

    Mva7

    Thread Starter saveatrain

    (@saveatrain)

    its better that you change this cookie name because it might have a collision with other cookies for some users.

    Plugin Author mva7

    (@mva7)

    Hi,

    the cookie is not ours, it is automatically created when one uses sessions in PHP. A new version is released: 1.17.4.

    Now it should work.

    Regards,

    Mva7

    ps. Let us know if you can’t get the CSS to work we provided before.

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