Comments (41)
I cannot reproduce it, what's your server setup?
from grav-plugin-admin.
My setup is as follows. I know it can be optimised with other components like php-fpm but i'm happy with it for dev work.
Debian 7.8
Apache 2.2
PHP 5.4 running as mod_php
Apache runs as www-data. Grav is installed in /var/www/html/grav01, running from the default docroot to keep things simple (no named vhost). That entire directory and everything under it is owned by www-data (user and group).
All components have been installed from the official apt repos.
It's a very simple setup, nothing complicated (IMHO) about it.
from grav-plugin-admin.
Is the theme symlinked, or you just installed it through the admin?
from grav-plugin-admin.
I installed it through the admin.
It's a completely fresh install of Grav 0.9.35, with the admin plugin installed first, followed by Theme installation and attempted removal. Nothing else was done to it.
from grav-plugin-admin.
Strange, I just recreated the process you followed but all works fine. Let's wait if @rhukster has ideas of what could be
from grav-plugin-admin.
Thanks for looking at it @flaviocopes
Something which may or may not be related is when I click on an installed but unactivated theme, there is a Save button in the top right corner. Upon clicking it throws the error "Validation failed: enabled is not defined in blueprints".
from grav-plugin-admin.
That is going to be fixed in the next round of theme releases, it's already fixed in the themes repositories - got the same error on save, but the uninstall works fine.
from grav-plugin-admin.
Hmm. i can't replicate this also. I really am not sure what it could be other than permissions.
from grav-plugin-admin.
can you for testing purposes set the theme to be 777 and see if you can delete via the admin? This will rule out permissions being the issue
$ chmod -R 777 themename/
Cheers.
from grav-plugin-admin.
Nope, didn't help :(
from grav-plugin-admin.
ok, well that actually helps. One other thing, I'm sure the GPM command from the console to remove the theme doesn't work either?
$ bin/gpm uninstall yourtheme
from grav-plugin-admin.
That actually worked!
from grav-plugin-admin.
Oh ok, then we definitely have narrowed it down to the admin plugin then. That will help. I'll see if flavio can take a look tomorrow morning his time.
from grav-plugin-admin.
Awesome. Thanks for taking the time to look into it :)
from grav-plugin-admin.
@PSiAU can you add this line
var_dump($target); var_dump(is_dir($target)); var_dump(is_file($target)); var_dump(file_exists($target)); exit();
to system/src/Grav/Common/Filesystem/Folder.php, before line 246? In short, before the highlighted line here: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Filesystem/Folder.php#L246
Then try to remove the theme again, and let me know what's the output you get in the page.
from grav-plugin-admin.
Sure thing. This is the result:
bool(false) bool(false) bool(false) bool(false)
from grav-plugin-admin.
Strange! It seems it cannot even find the theme folder. Can you put in this line https://github.com/getgrav/grav-plugin-admin/blob/develop/classes/gpm.php#L130
var_dump($location); var_dump(Installer::lastErrorCode()); exit();
And tell me the output?
from grav-plugin-admin.
This is the result:
bool(false) int(4)
from grav-plugin-admin.
Uhm.... replace that same line with
var_dump($package->package_type); var_dump($package->slug); exit();
I get, when deleting Afterburner2:
string(6) "themes" string(12) "Afterburner2"
. You?
from grav-plugin-admin.
I didn't ask, but which browser are you using?
from grav-plugin-admin.
This is what I get:
string(6) "themes" string(6) "Agency"
I'm using Safari 8, but I've also tried this with Chrome 44 and it does the same thing.
from grav-plugin-admin.
Really strange. Removing any plugin from the admin-side works fine, or same issue?
from grav-plugin-admin.
I hadn't tried that before......so I just gave it a shot then (removed the Email plugin), and i get a runtime exception:
One of the required plugins is missing or not enabled
Open: /var/www/grav01/user/plugins/admin/admin.php
'onTask.GPM' => ['onTaskGPM', 0]
]);
// Check for required plugins
if (!$this->grav['config']->get('plugins.login.enabled') ||
!$this->grav['config']->get('plugins.form.enabled') ||
!$this->grav['config']->get('plugins.email.enabled')) {
throw new \RuntimeException('One of the required plugins is missing or not enabled');
}
from grav-plugin-admin.
Haha that's actually killed my whole admin panel.
from grav-plugin-admin.
Ah that's actually because it's required by the admin plugin (should put up a warning prior to delete a plugin with dependencies). Reinstall it using bin/gpm
. What about a "normal" plugin, for example Feed?
from grav-plugin-admin.
After a fresh install and installing the Feed plugin, I was able to successfully disable it, but not uninstall it. It gave the same error:
Cannot delete non-existing folder.
from grav-plugin-admin.
Tracked it down to Locator::findResource() not finding plugins or themes during uninstall. @rhukster any ideas what could it be, maybe the Streams config not being setup properly?
from grav-plugin-admin.
It just makes no sense that it works for everyone else, but not for one person. Is it possible to try a newer version of PHP? I've tested 5.4.43 at it seems to work fine. But 5.5 or 5.6 would be even better.
from grav-plugin-admin.
Also can you compare the CLI version of PHP to your Apache/webserver version:
$ php -v
and:
info.php
<? phpinfo();
Point your browser at http://localhost/info.php
from grav-plugin-admin.
Both versions match: PHP 5.4.41-0+deb7u1
I also tried disabling Zend OPcache 7.0.5 just in case it could have contributed to the problem (trying everything at this stage) but no it didn't help either.
I'll try running it on Debian 8 later and see if that makes a difference.
from grav-plugin-admin.
I'm running out of ideas! :) Just to confirm:
- you can install via admin and gpm
- you can list via admin and gpm
- you can uninstall via gpm, but not admin
That correct?
from grav-plugin-admin.
Yup! That about sums it up.
I really hope it's not just me doing something wrong, i'd feel like a right fool otherwise.
from grav-plugin-admin.
What makes this weird is that it looks like it's a stream issue, but you are able to list all plugins and themes which are using the same stream. Plus you can even delete via CLI and GPM.
Could you try editing the file system/src/Grav/Common/Filesystem/Folder.php
, line 246
and make it:
var_dump('target', $target, 'is_dir', is_dir($target)); die;
if (!is_dir($target)) {
Then post here what you get?
from grav-plugin-admin.
This is the result:
string(6) "target" bool(false) string(6) "is_dir" bool(false)
from grav-plugin-admin.
I just setup a completely new Debian 8 VM with the following components:
Apache 2.4
PHP 5.6 running as mod_php
The same thing is happening :(
from grav-plugin-admin.
Good news! Replicated on a shared hosting. I'll test directly there.
from grav-plugin-admin.
Really glad to hear that! Thanks so much for keeping at it.
from grav-plugin-admin.
Fixed by getgrav/grav@42e6d58
from grav-plugin-admin.
Ok @PSiAU it was a simple fix in the end, once I got to the head of the problem!
You can install the latest Grav source from https://github.com/getgrav/grav or just apply the fix getgrav/grav@42e6d58, or just wait for the next Grav update to contain the fix :)
Thanks for your patience in solving this!
from grav-plugin-admin.
no that YOU @flaviocopes :)
I manually patched the file and can confirm it's fixed the problem.
from grav-plugin-admin.
π
from grav-plugin-admin.
Related Issues (20)
- HTML instead of normal editor HOT 3
- Improved classes in Grav admin theme twig templates
- If I enter a long content on a page, it will fail to save HOT 1
- Admin cannot complete page saving when Xdebug enabled HOT 2
- Setting "Display header image" for "Blog Item" has no effect. HOT 4
- Order pages ( in admin page view ) HOT 1
- 404 error
- Hostname is missing from pages in YAML linter
- Backup Profile Description
- Display offending protocols and tags in Security Scanner
- Menu Modal Toolbar not showing without admin.super permission HOT 7
- grav.CRITICAL: Syntax error with Page Security tab - Page Groups HOT 1
- Check/display new or existing files/medias in page
- /admin/pages loading
- An exception has been thrown during the rendering of a template HOT 1
- ISSUE/BUG: Accounts without βSUPER USERβ cannot duplicate pages HOT 6
- Error date time runtimeerror HOT 1
- Unable to reset a password by a user with a space in their username
- Adding port number when creating folder HOT 2
- Passkeys / FIDO2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grav-plugin-admin.