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

ignore pages with parameters #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tobiasla78
Copy link

Problem: if you have a Filament page with a parameter like this protected static ?string $slug = 'test/{parameter}'; it will break the plugin. Even if you set shouldRegisterSpotlight to false in your page.

Solution: this code just ignores all pages with parameters

Discord user jamiecee20 brought this to my attention as it breaks my plugin (https://discord.com/channels/883083792112300104/1252364577228853389)

@pxlrbt
Copy link
Owner

pxlrbt commented Jun 23, 2024

Wouldn't your solution also remove all Edit and View pages? Why doesn't shouldRegisterSpotlight() work? 🤔

@tobiasla78
Copy link
Author

Yes you are absolutely right shouldRegisterSpotlight() is working (forgot something while testing) and it would break custom edit and view pages, sorry for that.

Only problem that's remaining is that plugins with custom pages that using parameters will automatically not work and users can't add shouldRegisterSpotlight() without publishing the plugin page.

@pxlrbt
Copy link
Owner

pxlrbt commented Jul 11, 2024

Sorry, I am wrong. Edit and View Pages are registered via the ResourceActiion. So this should work for them, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants