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

Select modifier conflicts with nav tag's select param #10211

Closed
jacksleight opened this issue May 29, 2024 · 7 comments · Fixed by #10218
Closed

Select modifier conflicts with nav tag's select param #10211

jacksleight opened this issue May 29, 2024 · 7 comments · Fixed by #10218
Assignees

Comments

@jacksleight
Copy link
Contributor

jacksleight commented May 29, 2024

Bug description

Since upgrading to 5.6.0 I'm seeing this error coming from the CoreModifiers::select() method:

method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given

The site isn't using the select modifier, but I've tracked the issue down to usage of the select param in the nav tag:

{{ nav:main select="title|url" }}

If I remove that param it works. It seems to be interpreting the param as a modifier.

How to reproduce

Try to use the nav tag with the select param.

Logs

No response

Environment

Statamic
Addons: 10
Sites: 1
Stache Watcher: Disabled
Static Caching: Disabled
Version: 5.6.0 PRO

Statamic Addons
duncanmcclean/guest-entries: 4.0.1
duncanmcclean/simple-commerce: 7.2.0
jacksleight/statamic-bard-texstyle: 3.2.2
jonassiewertsen/statamic-livewire: 3.3.1
statamic-rad-pack/runway: 7.1.0
stillat/relationships: 2.2.0
studio1902/statamic-peak-browser-appearance: 3.4.1
studio1902/statamic-peak-commands: 3.2.0
studio1902/statamic-peak-seo: 7.5.0
studio1902/statamic-peak-tools: 4.4.2

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@lukeagsmith
Copy link

I've just bumped into this too.

@robdekort
Copy link
Contributor

Same. Critical issue.

@duncanmcclean
Copy link
Member

duncanmcclean commented May 29, 2024

Likely related to the introduction of the select modifier in #10183. In the meantime, downgrading to v5.5.0 should fix the issue.

@robdekort
Copy link
Contributor

Likely related to the introduction of the select modifier in #10183. In the meantime, downgrading to v5.5.0 should fix the issue.

It does. Bit surprised though this passed through all the tests.

@duncanmcclean
Copy link
Member

duncanmcclean commented May 29, 2024

Looking into it now.

@robdekort
Copy link
Contributor

❤️

@robdekort
Copy link
Contributor

Full stack trace can be found here: #10215

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

Successfully merging a pull request may close this issue.

5 participants