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

Error: Exception after upgrading to 3.0.165 from 3.0.155 #1242

Closed
jacmaes opened this issue Sep 3, 2020 · 3 comments
Closed

Error: Exception after upgrading to 3.0.165 from 3.0.155 #1242

jacmaes opened this issue Sep 3, 2020 · 3 comments

Comments

@jacmaes
Copy link

jacmaes commented Sep 3, 2020

I'll update this bug report with more information when I manage to narrow down the possible origin of the error, but on my blog template, which was working correctly before upgrading to 3.0.165 from 3.0.155, I'm getting the following exception:

`Oh no… Error: Exception: Unrecognized operator: $ (in wire/core/Selectors.php line 410)

#0 wire/core/Selectors.php (244): Selectors->extractOperators()
#1 wire/core/Selectors.php (145): Selectors->extractString()
#2 wire/core/Selectors.php (131): Selectors->setSelectorString()
#3 wire/core/PagesLoader.php (311): Selectors->init()
#4 wire/core/Pages.php (255): PagesLoader->find()
#5 wire/core/Wire.php (400): Pages->___find()
#6 wire/core/WireHooks.php (823): Wire->_callMethod()
#7 wire/core/Wire.php (465): WireHooks->runHooks()
#8 wire/core/Page.php (4557): Process

This error message was shown because: site is in debug mode. ($config->debug = true; => site/config.php). Error has been logged.`

@jacmaes
Copy link
Author

jacmaes commented Sep 4, 2020

Found the culprit:

$entries = $page->entries_per_page; $posts = $page->children("limit=$entries");

If limit=$entries is in single quotes, the error occurs. With double quotes, the error goes away. The field entries_per_page is an integer. Is that normal?

@teppokoivula
Copy link

If limit=$entries is in single quotes, the error occurs. With double quotes, the error goes away. The field entries_per_page is an integer. Is that normal?

With double quotes it gets interpolated into an integer (limit=5), with single quotes it gets added as-is (limit=$entries). Sounds reasonable enough to me — single quotes don't make any sense in this context, and thus the error message reveals an actual error in code.

@jacmaes
Copy link
Author

jacmaes commented Sep 4, 2020

Understood. Thanks for the clarification. I'm closing the issue then.

@jacmaes jacmaes closed this as completed Sep 4, 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

No branches or pull requests

2 participants