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

[39.1.1 and newer] [Moodle 4.1] admin/filters.php settings link leads nowhere #13

Open
danowar2k opened this issue Jan 3, 2025 · 9 comments · May be fixed by #14
Open

[39.1.1 and newer] [Moodle 4.1] admin/filters.php settings link leads nowhere #13

danowar2k opened this issue Jan 3, 2025 · 9 comments · May be fixed by #14
Assignees
Labels
Bug Something isn't working

Comments

@danowar2k
Copy link

Describe the bug
On the admin/filters.php page, if a filter has settings, a link to the filter plugin settings is generated. filter_synhi declares settings. The generated link leads to admin/settings.php?section=filtersettingsynhi .
This link leads nowhere, because there is no such section.

The section means a settings page. This here

$page = new admin_settingpage('filter_synhi_settings', get_string('settings', 'filter_synhi'));
says the name of the settings page is "filter_synhi_settings". When you change that to "filtersettingsynhi", the link leads to the filter settings of filter_synhi. Maybe that is what you want it to be, instead of a link to the category (don't know if that works).

To Reproduce
Steps to reproduce the behaviour:

  1. Go to admin/filters.php
  2. Click on the "Settings" link to admin/settings.php?section=filtersettingsynhi.
  3. See an error that says the section is nonexistent

Expected behaviour
The link should lead to the settings page of filter_synhi.

Versions (please complete the following information):

  • Moodle: 4.1.13
  • Filter: 39.1.1 (but the code is also like this in the newest version)
  • Browser and version: Chrome 131.0.6778.205 on Windows 10

Additional context
Add any other context about the problem here.

@danowar2k danowar2k added Bug Something isn't working Pending replication labels Jan 3, 2025
@gjb2048 gjb2048 added Cannot replicate Unable to replicate the issue and removed Pending replication labels Jan 3, 2025
@danowar2k
Copy link
Author

So you request me to replicate the issue in Moodle 4.1.15? If so, okay, I'll report back.
Or do you mean I should replicate the issue in the newest plugin version V39.1.2 ?

By "Cannot replicate" you mean you couldn't replicate the bug in the newest Moodle release and the newest plugin version?
Asking because that will indicate what I'm looking for...

@gjb2048
Copy link
Collaborator

gjb2048 commented Jan 3, 2025

By "Cannot replicate" is means that I can't replicate on Moodle 4.1.14+ (Build: 20241011), with V39.1.2 and that before raising issues that you kindly ensure that you are running "the current version for your release of Moodle" before I spend time looking at an issue that may have already been addressed.

@danowar2k
Copy link
Author

Okay. I've checked out moodle/moodle@f1fbfdf (weekly 4.1.15+) and the plugin version https://github.com/gjbarnard/moodle-filter_synhi/releases/tag/V39.1.2

and tested again.

admin/filters.php still shows the following link:
image

Which leads to the error page.

danowar2k added a commit to danowar2k/moodle-filter_synhi that referenced this issue Jan 8, 2025
@danowar2k
Copy link
Author

This fix should do it: #14 (at least it fixes my Moodle 4.1 settings link)

@gjb2048 gjb2048 removed the Cannot replicate Unable to replicate the issue label Jan 8, 2025
@gjb2048
Copy link
Collaborator

gjb2048 commented Jan 8, 2025

@danowar2k I can now replicate, thanks for the information and patch. With the latter I have implemented a better solution that is in line with the M4.3+ version - though possibly won't work on M4.0-.

@danowar2k
Copy link
Author

Ah you use Boost's tab function so that you can let the admin/filters.php link be a link to the whole tab group. I think I understand.

@danowar2k
Copy link
Author

What's your preferred process in issues? Do you close them yourselves or do you want me to check out the solution and close the ticket if I agree?

@gjb2048
Copy link
Collaborator

gjb2048 commented Jan 10, 2025

@danowar2k I manage everything and will ask accordingly given the individual circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants