Hello Axel,
Thank you for reaching out to us, and sorry for the late response.
Can you tell us which plugins, which theme, and which page builder are you using so we can check it out locally?
On the first look, it seems as if a file is missing and thus can’t be activated, but it also seems you troubleshoot this already and know it’s a conflict, so please provide us with as much info as possible so we can try replicating it locally.
Kind regards.
Hello,
I believe that it is neither a theme nor a plugin but rather my structure.
I’m using bedrock structure which required HttpFoundation too.
Hi again Axel.
Can you please comment loading of PHP classes “/symfony/http-foundation” in vendor/composer autoload, and let us know if this resolves the issue?
Kind regards
Hi,
In which side ? Amelia ? Or in my bedrock structure ?
If it’s in amelia side, I get this error :
in /app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php (line 316)
'title' => [
'appointment' => $savedSettings['eventTitle'],
'event' => '%event_name%'
],
Trying to access array offset on value of type null
-
This reply was modified 3 years, 12 months ago by
Axel DUCORON.
Hello again
In your last response, you mentioned you get “this error”. Are you still referring to the initial error (stackTrace) or have you tried commenting HttpFoundation in autoload with Amelia’s composer, and you received a new error that wasn’t provided in your last response?
We can’t see the error, just the line of code where it occurred. Can you send us the StackTrace of the error?
In short, you need to access Amelia’s folder /ameliabooking/vendor/composer/ and comment the line of code in autoload of the HttpFoundation library.
Kind regards
Steps :
1. In vendor/composer/autoload_psr4.php L18 : comment
2. Activate plugin
3. I get this error :
ErrorException:
Trying to access array offset on value of type null
at /app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php:316
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Trying to access array offset on value of type null', '/app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php', 316, array())
(/app/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:54)
at Roots\Acorn\Bootstrap\HandleExceptions->handleError(2, 'Trying to access array offset on value of type null', '/app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php', 316)
(/app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php:316)
at AmeliaBooking\Infrastructure\WP\InstallActions\ActivationSettingsHook::initGoogleCalendarSettings()
(/app/web/app/plugins/ameliabooking/src/Infrastructure/WP/InstallActions/ActivationSettingsHook.php:40)
at AmeliaBooking\Infrastructure\WP\InstallActions\ActivationSettingsHook::init(false)
(/app/web/wp/wp-includes/class-wp-hook.php:307)
at WP_Hook->apply_filters(null, array(false))
(/app/web/wp/wp-includes/class-wp-hook.php:331)
at WP_Hook->do_action(array(false))
(/app/web/wp/wp-includes/plugin.php:474)
at do_action('activate_ameliabooking/ameliabooking.php', false)
(/app/web/wp/wp-admin/includes/plugin.php:689)
at activate_plugin('ameliabooking/ameliabooking.php', 'http://mysite.lndo.site/wp/wp-admin/plugins.php?error=true&plugin=ameliabooking%2Fameliabooking.php', false)
(/app/web/wp/wp-admin/plugins.php:58)
Hello again.
As far as we understand, you’re not using WordPress, correct?
The problem is that our plugin uses WordPress functionalities, and one of those functionalities is that the Settings data is written in the wp_options table. Specifically, this:
get_option(‘amelia_settings’)
If you’re using Amelia outside of WordPress, this is causing the issue.
Hello,
I’m using WordPress.
I’m just using special structure named Bedrock (https://roots.io/bedrock/).
To be precise: at the root of my WordPress project I use composer.
My composer loads the http-foundation library.
Amelia also uses the http-foundation library. But I think the two versions of http-foundation are different.
I believe this is a known case as this article attests : https://graphql-api.com/blog/graphql-api-for-wp-is-now-scoped-thanks-to-php-scoper/#heading-taking-the-decision-to-scope
Code analysis :
Last version of http-foundation : https://github.com/symfony/http-foundation/blob/5.4/ResponseHeaderBag.php#L91
Code used in Amelia :
/**
* {@inheritdoc}
*/
public function all()
{
$headers = parent::all();
foreach ($this->getCookies() as $cookie) {
$headers['set-cookie'][] = (string) $cookie;
}
return $headers;
}
I don’t know if somehow you have a way to update http-foundation ?
Thanks for help.
Thank you for your response.
The last error you sent us indicates that there are no “amelia_settings” in the database table wp_options.
Can you please check the option_name column in the database, and search for “amelia_settings”?
Kind regards
Yes I have this option.
Is not posible to debug via livechat or other ?
We take more than a week to fix a problem that could surely be fixed in 5 minutes.
Thanks for your help
Hey Axel.
Unfortunately, we don’t have a live chat.
If you’re using the full version of Amelia, you can open a ticket on our official support platform, and we’ll gladly help you there, just make sure to mention you’ve been forwarded from wp.org.
Kind regards.