Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin in multisite setup #1315

Closed
unmick opened this issue Jan 20, 2018 · 4 comments
Closed

Admin in multisite setup #1315

unmick opened this issue Jan 20, 2018 · 4 comments
Labels

Comments

@unmick
Copy link

unmick commented Jan 20, 2018

Hello !

The main site is well working .
The subdomain is also working except the admin plugin.

I have a "array_map(): Argument #2 should be an array" on line 500 of the /user/plugins/admin/admin.php

$fa_icons_file = CompiledYamlFile::instance($this->grav['locator']->findResource('plugin://admin/themes/grav/templates/forms/fields/iconpicker/icons' . YAML_EXT));
        $fa_icons = $fa_icons_file->content();
        $fa_icons = array_map(function ($icon) {
            //only pick used values
            return ['id' => $icon['id'], 'unicode' => $icon['unicode']];
        }, $fa_icons['icons']);"

I have tried to add some path ( assets, config) in my setup but i have always got  the same message.
Extract of the setup.php :
"return [
    'environment' => $environment,
    'streams' => [
        'schemes' => [
            'user' => [
               'type' => 'ReadOnlyStream',
               'prefixes' => [
                   '' => ["user/{$folder}"],
               ]
            ],
            'plugins' => [
                'type' => 'ReadOnlyStream',
                'prefixes' => [
                    '' => ["user/plugins"],
                ]
            ],
            'themes' => [
                'type' => 'ReadOnlyStream',
                'prefixes' => [
                    '' => ["user/themes"],
                ]
            ],
            'cache' => [
                'type' => 'ReadOnlyStream',
                'prefixes' => [
                    '' => ["user/{$folder}/cache"],
                ]
            ]
        ]
    ]
];

Thanks

@rhukster
Copy link
Member

It's a known issue that the admin is not fully multisite compatible. This is something we hope to remedy in the future.

@unmick
Copy link
Author

unmick commented Jan 23, 2018

Do you think that a workaround could be to install the grav-plugin-admin in all the subsite ?
I am not sure to know how to setup this mainly in the setup.php...
But if you think that it's a possibility, i can search a solution and share it if i get it.

Thanks

@unmick
Copy link
Author

unmick commented Jan 23, 2018

I have just duplicated the folder admin :
/domain/user/sites/subdomain/plugins/admin
and surely handle the folder config :
/domain/user/sites/subdomain/config

All is working ! except the uploaded files as the image .....
The system always save the image to the /domain/user/themes/gateway/img instead of /domain/user/sites/subdomain/themes/gateway/img

Following this, a subsidiary question a little bit out of scope :
Is there a way to give a destination depending on if it's a "settle site" or the subdomain ?
main site : destination: 'user/themes/gateway/img'
subdomain : destination: 'user/sites/"subdomain"/themes/gateway/img'

something like destination: 'site@:/img' ? or with the streams ?

@ironbrunet
Copy link

Was this ever looked at ? Having the same issue as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants