Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Internal PHP error: #2 Undefined array key "groups"

Featured Replies

Hello everybody, 

I am creating a nightly export of the froxlor-settings using a cronjob:

/var/www/html/froxlor/bin/froxlor-cli froxlor:api-call froxlor Froxlor.exportSettings > /var/customers/froxlor-settings.backup.json

Unfortunately today I recognized the file just contains:

Internal PHP error: #2 Undefined array key "groups"

Any idea what could be the reason for this?

Solved by d00p

Go to solution

is "froxlor" an admin-user in your froxlor installation?

# bin/froxlor-cli froxlor:api-call admin Froxlor.exportSettings
{
    "data": "{....}"
}

works just fine with an existing admin-user....

  • Author
5 minutes ago, d00p said:

is "froxlor" an admin-user in your froxlor installation?

Yes froxlor is actually the admin-user. I am pretty sure that it worked in the past. 

  • Author

It looks like it is working again. I suspect it works after I've created an export via the WebUI which worked immediately. I'll keep an eye on this.

that's unlikely to be the cause. Any custom files in froxlor/actions/admin/settings? Because they all return an array starting with index 'groups'

  • Author

No I don't have any custom files in 

15 hours ago, d00p said:

froxlor/actions/admin/settings

The issue is that it doesn't work if the command is not executed from withhin the froxlor-base directory even if the path to the froxlor-cli is absolute.

Okay, that's something we can fix, thanks for noticing 

  • Solution

if you want, try the following patch, it should resolve the behavior:

diff --git a/lib/Froxlor/SImExporter.php b/lib/Froxlor/SImExporter.php
index a40e24bb..f823f295 100644
--- a/lib/Froxlor/SImExporter.php
+++ b/lib/Froxlor/SImExporter.php
@@ -65,7 +65,7 @@ class SImExporter
        public static function export()
        {
                $settings_definitions = [];
-               foreach (PhpHelper::loadConfigArrayDir('./actions/admin/settings/')['groups'] as $group) {
+               foreach (PhpHelper::loadConfigArrayDir(Froxlor::getInstallDir() . '/actions/admin/settings/')['groups'] as $group) {
                        foreach ($group['fields'] as $field) {
                                $settings_definitions[$field['settinggroup']][$field['varname']] = $field;
                        }

 

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.