Admin plugin dashboard its totally in blank

I’ve installed manually the admin plugin and it worked but the dashboard section its totally blank Dashboard-blank I’m newbie but I read yesterday almost the whole documentation online and I’m very excited about the project. Please help!

I’ve just checked and all the others sections are blanks too. Grav displayed briefly and error about downloading something with json, but It was too fast and I couldn’t read completely. Grav needs to look for something on internet? I mean the JS aren’t offline with Grav distribution??

Nothing should be required. Do you have any JS errors in your console? This looks like a CSS issue though. Can you try another browser?

I just temporally fixed… the problem appears to be that grav is unable to connect thru my proxy configuration and looked the plugins repository. I’ve comment the line on system/src/Grav/Common/GPM/Remote/Plugins.php that says:
protected $repository = ‘http://getgrav.org/downloads/plugins.json’;
And It works! but right now the error is: “A repository is required to indicate the origin of the remote collection”, but its totally functionally so far, I supose its a minor issue. Am I right? or need I take care of these soon? Thanks for the reply!!

You can turn off the check for updates in the admin plugin options, then it should not do any external checking. Can you try that?

The plugins section is unabled to show itself, shows instead this error: TwigErrorRuntime

An exception has been thrown during the rendering of a template (“Argument 1 passed to Grav\Common\Twig\TwigExtension::ksortFilter() must be of the type array, null given, called in C:\xampp\htdocs\grav\cache wig\1\2\12967d94f3022bd9c16a460e6f5f733bbd 38158f925044a8c8bdfaf859714653.php on line 32 and defined”) in “partials/plugins-list.html.twig” at line 8.

I suposse that it’s related to the line commented, because its the same for the themes section, the another one to look out content on internet.

There is anyway to turn off the check for updates without the admin plugin??

@rhukster Am I wrong about that I think? or there is another issue that I can’t see?

You need to uncomment the $repository line. Then try adding a file: user/config/plugins/admin.yaml and in that file simple have the line:

enable_auto_updates_check: false

See if that does it?

@rhukster I’ve tried but it behaves the same… I’ve created admin.yaml on plugins folder, I’ve changed the line enableautoupdates_check on the admin.yaml on the admin folder to false and the result was the same, there is another place where the call to the repositories is performed??

@rhukster I’ve redeclared the ksortFilter function without attributes like this:

public function ksortFilter()
{
return 0;
}

and it works! but the downside is grav admin plugin only recognize the plugins listed on the repository. Is there a way to change that and tell grav to check in the local plugins folder??
I hope that you’ll provide me an answer to continue testing and developing :slight_smile:
I find the project fascinating, I’m really enthusiastic about it!!!
I expect great things from you guys!!

If the computer is not connected to the internet and cannot reach the outside, Grav should work fine! Is the site local on your computer, can you test switching off the network to see if it works?

I’m confused how ksortFilter() is killing your admin, this is the bigger problem. It’s actually used by the admin and you can’t just null it out.

I think ksort fails because no array is actually passed, since admin.plugins in {% for slug, plugin in admin.plugins(not installing).toArray|ksort %} returns null or some sort of error

Actually I’m not sure it has anything to do with the connection. It should just list local plugins. What output do you get if you put

dump($list); exit();

in system/src/Grav/Common/Plugins.php, line 108 prior to ksort($list);?

@rhukster, @flaviocopes
Since yesterday I’ve testing grav offline, that’s why I agree with @flaviocopes, isn’t a connection issue. I’ve permorfed several tasks according to your suggestions:
1-I’ve added in system/src/Grav/Common/Plugins.php, line 108

dump($list); 
exit();

and I got on screen the array with my plugins locally installed. (Seems that’s not the issue).

2- I’ve disable first twig caching and later the complete site caching and the error was the same:
An exception has been thrown during the rendering of a template (“Argument 1 passed to Grav\Common\Twig\TwigExtension::ksortFilter() must be of the type array, null given, called in C:\xampp\htdocs\grav\vendor wig wig\lib\Twig\Cache\Null.php(40) : eval()'d code on line 32 and defined”) in “partials/plugins-list.html.twig” at line 8.

3-I thought that the place to test the issue ist user\plugins\admin hemes\grav emplates\partials\plugins-list.html.tw ig at line 8

{% for slug, plugin in admin.plugins(not installing).toArray|ksort %}

I’ve temporaly removed the ksort filter and got the plu gins section on screen but again (as the ksortFilter() redefinition) there were not plugins listed.

I think that the ksort function is not the problem, the problem has to be on the sentence:

admin.plugins(not installing).toArray

because this is the one that is returning an empty array

But the way I just notice that the plugins and themes count on the admin plugin left panel is 0.

How I can test?

admin.plugins(not installing).toArray

I’m not familiared with the twig basic language… I hope we can find the issue soon. I think we are close!

Ok does seem to be an offline/connection specific issue then, because obviously the admin.plugins listing is empty, so trying to perform a sort on a null is throwing that error.

The better solution would be to wrap all that logic in an if:

{% if admin.plugins is iterable %}
....
{% endif %}

@rhukster Ok, but which is the best place to wrap it? because if I put it on user\plugins\admin hemes\grav emplates\partials\plugins-list.html.tw ig at line 8, maybe the error is solved but the list continous empty… any thoughts??

Actually probably best to create an issue here: https://github.com/getgrav/grav/issues and we can work out why it’s not even getting the local plugins when your offline.

Ok, I will but I think maybe its not an offline issue… I think that is an admin.plugins() function… I hope that the cause appears soon!!

It’s already posted on https://github.com/getgrav/grav/issues/345