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

Fix error when searching #11

Closed
wants to merge 2 commits into from

Conversation

einardivision
Copy link

I was getting an error when trying to search in the control panel, nova wanted to call undefined static property model, so by defining this value here you nullify and error and everything works.

I was getting an error when trying to search in the control panel, nova wanted to call undefined static property model, so by defining this value here you nullify and error and everything works.
Whenever i loaded this package i was having problems with the search. I have a big project and i narrowed it down to being this package. Though i had fixed it with assigning the model property but i also needed to make global search false.

Is the search working for anyone?
@toonvandenbos
Copy link
Member

Hi @einardivision,

Thanks for your pull-request!

I think the NovaPage Resource is potentially as important in the global search as other "model" Resources. Therefore, maybe we should make it available for search instead of disabling it.

Honestly, I didn't try to make it work with the global search yet and that's why you're facing this issue. We should take a deeper look into it as soon as possible.

@einardivision
Copy link
Author

Yeah i just wanted to put it here incase someone else was having troubles :)

@toonvandenbos
Copy link
Member

Thanks a lot for that :)

@LasseHaslev
Copy link

I agree that the global search is relevant for the page resource as #15. But at this point this package is breaking the global search for every other nova resource.

Until the global search works with Page resources I suggest we disable it entierly.

/**
 * Indicates if the resoruce should be globally searchable.
 *
 * @var bool
 */
public static $globallySearchable = false;

@voidgraphics
Copy link
Member

@LasseHaslev I agree, and I just pushed a new release (v0.2.1) that does exactly what you suggested. Hopefully we can find some time to fix the search properly soon.

@LasseHaslev
Copy link

@voidgraphics it works! Thanks for quick response and great package!

toonvandenbos added a commit that referenced this pull request Jun 16, 2020
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.

None yet

4 participants