Missing hooks/links-nav title

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:

Missing hooks/links-nav title

Post by onoehring » 2019-11-24 10:40

Hi,

AG 5.81.
I notice, that when I add a new item to a menu in hooks/links-navmenu.php like this

Code: Select all


		$navLinks[] = array(
			'url' => 'hooks/setup_googleauth.php', 
			'title' => 'Google Authenticator', 
			'icon' => '/resources/table_icons/googleauthenticator.png',
			'groups' => array('*'),
			'table_group' => 1
		);
but the user has no access permissions to any of the regular tables in that group (group ID 1) there is no headline for the menu ... which is ... confusing ;-) :
ec-miss.png
ec-miss.png (6.75 KiB) Viewed 5274 times
A user with permissions to tables in that group sees this like shown here:
ec-miss2.png
ec-miss2.png (13.07 KiB) Viewed 5273 times
Is there a way to add a completely new menu to the links-section and give that menu a/the title I want? This is a possible workaround, but not a real solution to the problem described I believe.

Olaf

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Missing hooks/links-nav title

Post by ronwill » 2019-11-24 12:42

Don't you need a comma end of table group line!
i.e.
'table_group' => 1,
Cheers, Ron
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Missing hooks/links-nav title

Post by onoehring » 2019-11-24 13:10

Hi Ron,

I believe no, as the array ends there... checking ... no, No difference.
php: The comma would not need to be after the last "entry" before the closesing ) - the array ends there, so no comma needed.

Olaf

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Missing hooks/links-nav title

Post by ronwill » 2019-11-26 00:03

Hi Olaf,

Agree, comma was not needed, I tried your code (changed to point to a file/icon existing in my project and as it worked fine for me (I'm using latest version) I can't re-create the issue.

As a workaround that I've used in the past (for a different reason: To have my added hooks/php file show in main menu area in a position I want, not added to bottom of a menu under a break line as happens when using links-navmenu.php).

I simply create a new table in AppGini with just an id + text field, name this table similar to my created hooks.php file, then select the table group I want it to belong to. I then go to the created hooks file for this dummy table.php file and under the header function I point it to the hooks file i want i.e, for your case:

case 'tableview':
header('Location: hooks/setup_googleauth.php');

This works fine for me and does not get overwritten as a bonus lol. I think it will give you the result you need. I don't know coding so I always look for alternative solutions!

Cheers, Ron
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Missing hooks/links-nav title

Post by onoehring » 2019-11-26 04:11

Hi Ron,

sounds good. I will try that, but i still think it's a workaround. Does on really need fields in the simply AG table which is used to create the navigation link, or did you try to create a table only without any fields?

I agree that the line between AG tables and added links-files in the menu has it's good, but also it's bad.

Olaf

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Missing hooks/links-nav title

Post by ronwill » 2019-11-26 17:06

Needs field or it gives error that table has no fields on generating project.
Ron
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course


Post Reply