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
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
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 2782 times
Olaf

User avatar
a.gneady
Site Admin
Posts: 1281
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: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
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: 1281
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: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
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


Post Reply