WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => General Help & Support => Topic started by: RonR on December 13, 2020, 06:55:50 AM

Title: Modify pages backend
Post by: RonR on December 13, 2020, 06:55:50 AM
Just updated 2.12 to 2.13
Used unzip.php
PHP7.3
during update no errors reported.

Cannot access modify pages in backend, getting a HTTP ERROR 500.

Hosting error log:
Backend log: PHP Warning:  require(/home/mydomain/domains/mydomain.nl/public_html/admin//config.php):
failed to open stream: No such file or directory in /home/mydomain/domains/mydomain.nl/public_html/admin/pages/modify.php on line 52\n, referer: https://mydomain.nl/admin/pages/index.php
[Sun Dec 13 06:13:26.507679 2020] [lsapi:error] [pid 4190830:tid 139812719716096] [client 145.133.95.20:60565]
[host www.mydomain.nl] Backend fatal error: PHP Fatal error:  require(): Failed opening required '/home/mydomain/domains/mydomain.nl/public_html/admin//config.php'
(include_path='.:/opt/alt/php73/usr/share/pear') in /home/mydomain/domains/mydomain.nl/public_html/admin/pages/modify.php on line 52\n, referer: https://www.mydomain.nl/admin/pages/index.php


Looks like it is looking for config.php in the wrong place.(/admin//config.php)
How to fix?

Greetz.
Title: Re: Modify pages backend
Post by: hgs on December 13, 2020, 07:18:07 AM
After the unzip.php did you have a link to the upgrade-script in the backend?
So you could log into the backend?
Was the config.php rewritten when running.
For this you had to press F5 once.
Title: Re: Modify pages backend
Post by: RonR on December 13, 2020, 07:40:59 AM
Yes, the unzip had a link to the backend, and there I did run the upgrade-script.
I have a autogenerated config-file for 2.13, which is exactly the same as the 2.12 one exept for the comments

*** auto generated config file for 2.13.0
 *** WebsiteBaker upgrade from 2.12.2 to 2.13.0

old one:
*** auto generated config file for 2.12.2
 *** WebsiteBaker upgrade from 2.12.1 to 2.12.2

I cannot recall pressing f5 or being promted to do so.
Title: Re: Modify pages backend
Post by: RonR on December 13, 2020, 07:42:27 AM
I can remember clearing cache because the layout was messed up.
Title: Re: Modify pages backend
Post by: RonR on December 13, 2020, 02:48:19 PM
took a step back and renamed my admin to "admin" again.
Then it works OK and get no error 500.

Looks like something is looking for a hardcoded admin and generates a 500 when the admin is renamed.

Prefer for safety reasons to rename the admin directory.
Title: Re: Modify pages backend
Post by: Luisehahne on December 13, 2020, 03:42:51 PM
Ok, we will be going to fix it, Tks for testing

Dietmar
Title: Re: Modify pages backend
Post by: dbs on December 13, 2020, 04:07:44 PM
What means "admin"? User or folder?
The folder is hartcoded in config.php
Code: [Select]
define('ADMIN_DIRECTORY', 'admin'); // no leading/trailing slash or backslash!! A simple directory name only!!
Title: Re: Modify pages backend
Post by: RonR on December 13, 2020, 06:03:01 PM
I mean admin folder.
 I get a error 500 if I change foldername and config define.

It looks for config.php in
Mynewadminfolder//config.php.

(See the double slashes)

Instead of root folder.
Title: Re: Modify pages backend
Post by: Luisehahne on December 13, 2020, 08:01:49 PM
Download it for testing.
Regarding the rename 'admin' folder: Please note, however, that this functionality is already set to the 'deprecated' status. With the next minor version this directory will disappear completely in the course of the 'refactoring'.

Download WebsiteBaker 2.13.0 RC1 r13  (https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?download=08AA8D65), a complete, installable release candidate including all previously reported and fixed problems.
Title: Re: Modify pages backend
Post by: RonR on December 14, 2020, 01:09:01 PM
downloaded and installed, working great so far!

Thanks for your help and keep up the good work!

Greetz,
Ron