Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When viewing Links, errors can be generated #4990

Closed
anarkia1976 opened this issue Nov 7, 2022 · 7 comments
Closed

When viewing Links, errors can be generated #4990

anarkia1976 opened this issue Nov 7, 2022 · 7 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue

Comments

@anarkia1976
Copy link

Hi Guys,

When you create an external links to a web page with a user that has the correct permissions, for example USER1, the latter is able to correctly view the site as a TOP TAB and recall it.

USER1
image

image

If you create a second user, for example USER2 with the same permissons, the same will correctly display the URL in the external links but will not be able to recall it due to a permissions problem.

USER2
image

2022-11-07 09:17:04 - CMDPHP PHP ERROR NOTICE Backtrace: (/links.php[37]:form_actions(), /links.php[186]:CactiErrorHandler())
2022-11-07 09:17:04 - ERROR PHP NOTICE: Trying to access array offset on value of type null in file: /var/www/html/cacti/links.php on line: 186
2022-11-07 09:16:05 - CMDPHP PHP ERROR NOTICE Backtrace: (/links.php[37]:form_actions(), /links.php[186]:CactiErrorHandler())
2022-11-07 09:16:05 - ERROR PHP NOTICE: Trying to access array offset on value of type null in file: /var/www/html/cacti/links.php on line: 186 

I don't know if the behavior is correct or if the external links must be personal and not viewable by other users.

Thanks a lot.

@anarkia1976 anarkia1976 added bug Undesired behaviour unverified Some days we don't have a clue labels Nov 7, 2022
@TheWitness
Copy link
Member

What PHP version?

@anarkia1976
Copy link
Author

What PHP version?

php -v
PHP 7.4.3 (cli) (built: Aug 17 2022 13:29:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

@anarkia1976
Copy link
Author

I have seen that when an external link is created by a specific user, in order to make it seen by others, you have to change the settings of the individual user.
I do not know if it is correct, the problem is that when you have many users you should go hand in hand to give the permissions one by one.

image

@TheWitness
Copy link
Member

Thanks for reporting that backtrace. That was a bug and I'll use this ticket to correct it. On the other issue, it seems quite odd. First, you have to grant the user access to the links, and then you have to give them access to the specific link. Maybe you did one and not the other.

@TheWitness TheWitness changed the title [CACTI - 1.2.23 - Latest Source] Utilities - External Link Backtrace generated on the Links page due to undefined variable use Nov 9, 2022
TheWitness added a commit that referenced this issue Nov 9, 2022
Backtrace generated on the Links page due to undefined variable use
@TheWitness TheWitness added resolved A fixed issue confirmed Bug is confirm by dev team and removed unverified Some days we don't have a clue labels Nov 9, 2022
@TheWitness
Copy link
Member

Use group permissions. It makes life much easier.

@TheWitness
Copy link
Member

Did you use the 'Copy User' dropdown to make the new user? If so, and it did not set the Links realms, that is another bug.

@anarkia1976
Copy link
Author

Did you use the 'Copy User' dropdown to make the new user? If so, and it did not set the Links realms, that is another bug.

I have not configured a new user, the change was related to making the page visible to existing users. Doing it per group is a great suggestion. Thanks a lot for the info.

@netniV netniV changed the title Backtrace generated on the Links page due to undefined variable use When viewing Links, errors can be generated Dec 31, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants