Bug (5.75)?: Changes in Admin Settings wreck path includes

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by onoehring » 2019-06-19 07:32

Hi,
I changed something in the Admin settings (Admin Area -> Utilities -> Admin settings).
This seems to recreate the config.php in root.
When I tried to edit a member after wards, I received this error
Not Found
The requested URL /admin/admin/pageEditMember.php was not found on this server.
Strangs. So I looked for it. Finally I noticed, that in config.php (fortunately there is a config.bak.php).

So in this config.php in line 6 $appURI is now defined: My editing (and I did not change any setting that could have forced changes to this variable) was suddenly 'admin' instead of '' (nothing). I removed the admin and set nothing again - and it works.

Maybe someone else should check on that to confirm.

Left: New, right: old (I messed up the extensions I noticed)
ec16.png
ec16.png (21.41 KiB) Viewed 426 times
Olaf

User avatar
a.gneady
Site Admin
Posts: 1034
Joined: 2012-09-27 14:46
Contact:

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by a.gneady » 2019-07-03 12:19

Hmm ... I'm inspecting this issue now but unable to reproduce it. Is it possible to specify the URL of your admin settings page? I don't need to access the page itself so please feel free to obfuscate the domain name .. I just need to test how the URL is getting parsed to extract the $appURI value.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.
:arrow: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.
:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by onoehring » 2019-07-03 13:14

Hi Ahmed,

it's something like
https://www.my-page.de/admin/pageSettings.php

I should note, that I added two lines of code to the bottom of the file (as I suggested here viewtopic.php?f=4&t=1369#p10162 ), after the closing bracket of $adminConfig = array( ); HERE MY CODE

Code: Select all

	//Auditor
	if (!(isset($_SESSION ['dbase']) && $_SESSION ['dbase'] != '')) {$_SESSION ['dbase'] = $dbDatabase;};
	include("$currDir/auditLog_functions.php");
Olaf

User avatar
a.gneady
Site Admin
Posts: 1034
Joined: 2012-09-27 14:46
Contact:

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by a.gneady » 2019-07-03 21:55

Thanks, Olaf. It seems this could occur if you're running your AppGini app on the domain root directly ... Please try this and if it works fixing this issue, kindly let me know to apply it in a hotfix release: Please open the generated admin/pageSettings.php file in a text/code editor, and find this line:

Code: Select all

'appURI' => preg_replace('/\/admin$/', '', trim(dirname($_SERVER['SCRIPT_NAME']), '/')),
Now replace it with this one:

Code: Select all

'appURI' => trim(preg_replace('/admin$/', '', dirname($_SERVER['SCRIPT_NAME'])), '/'),
EDIT: I forgot to mention one additional step: Please go to Admin area > Utilities menu > Admin Settings … Scroll down to 'Save changes' and click it (no need to make any actual changes though before clicking it). This is intended to update the config.php file to the correct app path. Afterwards, kindly check if the issue is fixed or not.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.
:arrow: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.
:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by onoehring » 2019-07-04 04:12

Hi Ahmed,

yes, this works.
Of course it removes my additional code.
FYI: The application runs on the root of a subdomain.

Olaf

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Post by onoehring » 2019-07-17 10:33

Hi,

I want to close this report as it is fixed in AppGini 5.76

Thanks
Olaf

Post Reply