Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

404 Error "Object not found" after installing admin plugin (on fresh install)

admin first-time

Solved by Valentin View solution

Started by Valentin 3 years ago · 7 replies · 1389 views
3 years ago

Hello

I downloaded and uploaded Grav core to my web root --> The default website is working
https://getgrav.org/download/core/grav/1.7.38

Then I installed the admin plugin with the CLI “bin/gpm install admin” --> 404 Error

TXT
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the [webmaster](mailto:[email protected]).

This thread is similar : /forum/archive/404-not-found-after-installing-admin-plugin-t8640 and the FAQ 404 Error didn't help

My .htaccess contains :

TXT
RewriteBase /

Web root :

TXT
$ ls -ll
total 18496
drwxr-sr-x  2 uid216062 gid216062       29 Jan 26 14:20 assets
drwxr-sr-x  2 uid216062 gid216062       29 Jan  2 18:25 backup
drwxr-sr-x  2 uid216062 gid216062       80 Jan  2 18:25 bin
drwxr-sr-x  7 uid216062 gid216062      156 Jan 26 17:37 cache
-rw-r--r--  1 uid216062 gid216062   217483 Jan  2 18:25 CHANGELOG.md
-rw-r--r--  1 uid216062 gid216062     5476 Jan  2 18:25 CODE_OF_CONDUCT.md
-rw-r--r--  1 uid216062 gid216062     4574 Jan  2 18:25 composer.json
-rw-r--r--  1 uid216062 gid216062   232639 Jan  2 18:25 composer.lock
-rw-r--r--  1 uid216062 gid216062     7098 Jan  2 18:25 CONTRIBUTING.md
-rw-r--r--  1 uid216062 gid216062 18421985 Jan  2 19:25 gravcoreadmin.zip
drwxr-sr-x  2 uid216062 gid216062       29 Jan  2 18:25 images
-rw-r--r--  1 uid216062 gid216062     1500 Jan  2 18:25 index.php
-rw-r--r--  1 uid216062 gid216062     1071 Jan  2 18:25 LICENSE.txt
drwxr-sr-x  3 uid216062 gid216062       69 Jan 26 14:18 logs
-rw-r--r--  1 uid216062 gid216062       72 Jan  2 18:25 now.json
-rw-r--r--  1 uid216062 gid216062     7664 Jan  2 18:25 README.md
-rw-r--r--  1 uid216062 gid216062      274 Jan  2 18:25 robots.txt
-rw-r--r--  1 uid216062 gid216062      996 Jan  2 18:25 SECURITY.md
drwxr-sr-x 10 uid216062 gid216062     4096 Jan  2 18:25 system
drwxr-sr-x  2 uid216062 gid216062       29 Jan 26 14:34 tmp
drwxr-sr-x  8 uid216062 gid216062      112 Jan  2 18:25 user
drwxr-sr-x 29 uid216062 gid216062     4096 Jan  2 18:25 vendor
drwxr-sr-x  2 uid216062 gid216062      145 Jan  2 18:25 webserver-configs

Thx

3 years ago

@nk74000, I have not idea what the issue is...

but I can ask some questions:

  • is this happening on localhost or at your hoster?
  • what's the reason for adding RewriteBase /
  • If you use the original .htaccess, can you then access child pages like http://domain/typography/childpage?
  • Any interesting info in /logs/grav.log ?
  • Any interesting info in Apaches logs?
last edited 01/26/23 by pamtbaau
3 years ago

Hi pamtbaau

I'm using Grav on a web hoster (infomaniak)
Rewrite base was for testing / debugging (but didn't help at all), i just removed it this morning

  • mywebsite.xx/ ✅
  • mywebsite.xx/admin 🚫
  • mywebsite.xx/typography 🚫

No access to /logs/grav.log & apache.log

3 years ago

@nk74000, from the little info we have, it looks like Apache doesn't allow access to subdirectories.

There is a document page dedicated to the 404 issue.

The few forum topics I've come across were solved by setting AllowOverride All in /etc/apache2/sites-available/000-default.conf, like:

TXT
  <Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride All
     Require all granted
  </Directory>

Since your issue occurs on a server from a hoster, I wonder if you're able to change any settings. You might ask your hoster what the setting is.

3 years ago

@pamtbaau:

TXT
<Directory /var/www/>
   Options Indexes FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>

Apache configuration (Infomaniak)

TXT
<Directory "/home/clients">
        Options -Indexes +FollowSymLinks +MultiViews +IncludesNOEXEC +SymLinksIfOwnerMatch
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>

.htaccess Test Script

image|690x436

last edited 02/27/23 by Valentin
3 years ago Solution

I tried to reinstall from scratch with [Composer] and fixed the issue (https://learn.getgrav.org/16/basics/installation#option-2-install-with-composer)

My home page + Typography works (but Admin won't)
image|690x436, 75%
image|690x436, 75%
image|690x232, 75%

Then i installed the Admin module via GRAV CLI (bin/gpm install admin)

Output :

YAML
xxx@xxx:~/sites/mecafrontgrav$ ls -ll
total 512
drwxr-sr-x  2 uid216062 gid216062     29 Feb 22 17:20 assets
drwxr-sr-x  2 uid216062 gid216062     29 Feb 22 17:20 backup
drwxr-sr-x  2 uid216062 gid216062     80 Feb 22 17:20 bin
drwxr-sr-x  5 uid216062 gid216062    122 Feb 27 11:44 cache
-rw-r--r--  1 uid216062 gid216062 218566 Feb 22 17:20 CHANGELOG.md
-rw-r--r--  1 uid216062 gid216062    298 Feb 22 17:20 codeception.yml
-rw-r--r--  1 uid216062 gid216062   5476 Feb 22 17:20 CODE_OF_CONDUCT.md
-rw-r--r--  1 uid216062 gid216062   4574 Feb 22 17:20 composer.json
-rw-r--r--  1 uid216062 gid216062 232631 Feb 22 17:20 composer.lock
-rw-r--r--  1 uid216062 gid216062   7098 Feb 22 17:20 CONTRIBUTING.md
drwxr-sr-x  2 uid216062 gid216062     29 Feb 22 17:20 images
-rw-r--r--  1 uid216062 gid216062   1500 Feb 22 17:20 index.php
-rw-r--r--  1 uid216062 gid216062   1071 Feb 22 17:20 LICENSE.txt
drwxr-sr-x  2 uid216062 gid216062     29 Feb 22 17:20 logs
-rw-r--r--  1 uid216062 gid216062     72 Feb 22 17:20 now.json
-rw-r--r--  1 uid216062 gid216062   7664 Feb 22 17:20 README.md
-rw-r--r--  1 uid216062 gid216062    274 Feb 22 17:20 robots.txt
-rw-r--r--  1 uid216062 gid216062    996 Feb 22 17:20 SECURITY.md
drwxr-sr-x 10 uid216062 gid216062   4096 Feb 22 17:20 system
drwxr-sr-x  8 uid216062 gid216062   4096 Feb 22 17:20 tests
drwxr-sr-x  2 uid216062 gid216062     29 Feb 22 17:20 tmp
drwxr-sr-x  8 uid216062 gid216062    112 Feb 22 17:20 user
drwxr-sr-x 29 uid216062 gid216062   4096 Feb 27 11:42 vendor
drwxr-sr-x  2 uid216062 gid216062    145 Feb 22 17:20 webserver-configs
uid216062@h2web231:~/sites/mecafrontgrav$ bin/gpm install admin

GPM Releases Configuration: Stable

The following dependencies need to be installed...
  |- Package form
  |- Package login
  |- Package email
  |- Package flex-objects

 Install these packages? [Y|n]  (yes/no) [yes]:
 > Y

Preparing to install Form [v7.1.2]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok                             
  '- Success!  

Preparing to install Login [v3.7.3]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok                             
  '- Success!  

Preparing to install Email [v3.2.0]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok                             
  '- Success!  

Preparing to install Flex Objects [v1.3.4]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok                             
  '- Success!  

Dependencies are OK

Preparing to install Admin Panel [v1.10.39]
  |- Downloading package...   100%
  |- Checking destination...  ok
  |- Installing package...    ok                             
  '- Success!  

Clearing cache

Cleared:  /home/clients/3039860c41383ef0437176d5b3b11e53/sites/mecafrontgrav/cache/twig/*
Cleared:  /home/clients/3039860c41383ef0437176d5b3b11e53/sites/mecafrontgrav/cache/doctrine/*
Cleared:  /home/clients/3039860c41383ef0437176d5b3b11e53/sites/mecafrontgrav/cache/compiled/*

Touched: /home/clients/3039860c41383ef0437176d5b3b11e53/sites/mecafrontgrav/user/config/system.yaml

xxx@xxx:~/sites/mecafrontgrav$

It worked !

👍 1
3 years ago

@nk74000, Nicely done!

Question: Why installing using composer instead of downloading a grav-core+admin zip?

Anyway, you're up and running, that's what counts.

Please mark you last reply as "solution" to let others know your issue has a solution.

3 years ago

Using the manual install didn't worked in my configuration 😅

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 56 13 hours ago
Support · by Anna, 3 days ago
2 61 16 hours ago
Support · by Justin Young, 17 hours ago
1 32 17 hours ago
Support · by Duc , 1 week ago
2 66 5 days ago
Support · by Colin Hume, 1 week ago
2 59 5 days ago