-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix Exception while resolving variable 'toolbar' in template #1906
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
Conversation
|
I think this makes sense, but I'm not 100% sure if you're just fixing an issue with a missing variable or if the functionality of loading panel contents with If it's the former I'm good with the PR, but if it's the later we'd really want a test to make sure we're not regressing here. |
My local test was fine. After modification, no exception logs can be seen in the same scenario. |
tim-schilling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for identifying a solution! Would you be able to include a test that confirms that this is fixed? It's hard to accept a change without being able to see what it's fixing.
|
After turning on Debug level logging, VariableDoesNotExist errors appear frequently during use. But it does not affect the use. I think my PR is redundant. It can be closed. |
|
Just curious why you closed this? I don't think your PR was redundant at all. Error should not be thrown unless there is an error. I just spent half my day trying to figure out this issue, luckily I stumbled on your PR. |
|
@Riskcomplexx would you be able to open a PR with the fix and a test to prevent a regression? |
During the subsequent debugging process, I found that this exception did not affect the use. And there is already code to handle this exception. You can refer to the analysis in my comment above. In addition, the test for this PR is not easy to add. I don’t have much time to complete this test, so I can only close this PR. |


Description
When sending a request using ajax, toolbar.js will send a request at the same time:
GET /__debug__/history_sidebar/?store_id=<id> HTTP/1.1This request will throw the following exception when rendering the template.
It seems because toolbar is not passed in panel_context.
Fixes # (#1905 )
toolbarintopanel_context.Checklist:
docs/changes.rst.