-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
After Update - An exception has been thrown during the rendering of a template #38
Comments
Try |
Otherwise, please post your intro.htm file here |
Yes, I've already cleared the cache. the intro.htm, there is nothing special:
and
|
post your |
here it is:
I suppose, that I've to change the P.S. just changed the ti winter.blog, the same |
None of your files should be ending in |
Sorry, it was indeed
|
What plugins do you have installed and what versions are they? |
The
|
If you downgrade Winter.Blog to v2.1.1 does that solve the issue?
|
@LukeTowers , thank you for the command :)
|
The command should probably be |
@TheFehr , thanks! |
@mjauvin I think this issue is caused by the recent refactoring / improvements, are you able to replicate this at all? |
Sorry, can't reproduce this. |
@01Kuzma are you able to upload a basic version of your theme that contains just enough to replicate this issue in a fresh install of the winter develop branch and the latest blog plugin? |
@petehalverson side note, would really love to have Octodock back in some capacity 😉 |
@LukeTowers I will try my best |
Maybe this one will help... |
I tried your theme, but it is in an unuseable state, plugins/partials missing, layout half beaten to death... I managed to remove cruft to make it work, and didn't get the error you reported. Please submit a theme in a usable state and a procedure to replicate your issue with it. |
@mjauvin , that's strange. I'm getting some other errors with it, the frontend even is not loading throwing errors... |
@mjauvin I've reviewed it, I don't know what to upload, because the theme is image dependent (pulls them from storage), without them, it looks empty (as you probably saw it). Removing the component form the page , of course, removes this error. Removing the |
Can you show your Portfolio page ? Specifically, the url and the blogCategories component settings ? I use this component without any problems on my latest website. |
@LukeTowers I was able to generate an error with the blogCategories component when setting an invalid slug to the component slug property. What generates the error is this change:
PHP now throws an error if you assign null to this Class property because it now expects a string. So basically, if you have the following page/component settings, it will throw an error:
Notice the I suspect it's possible to trigger similar errors in other blog components as well because of the extra property validation that was added. This is not necessarily a bad thing, but might break badly written themes. |
@mjauvin , here it is:
|
Just change:
To:
To solve your issue. |
@LukeTowers should we change the component like this to restore original behavior ? diff --git a/components/Categories.php b/components/Categories.php
index 10a958c..b0609e3 100644
--- a/components/Categories.php
+++ b/components/Categories.php
@@ -17,12 +17,12 @@ class Categories extends ComponentBase
/**
* Reference to the page name for linking to categories.
*/
- public string $categoryPage = '';
+ public ?string $categoryPage = '';
/**
* Reference to the current category slug.
*/
- public string $currentCategorySlug = '';
+ public ?string $currentCategorySlug = '';
public function componentDetails(): array
{ |
@mjauvin it solves the And how to fix the main problem? What should I change here?
|
It happens because there are errors in your theme and the last update to the plugin introduced property validation for the components.
Please, always give the full settings section of the page you ask help for, otherwise it's hard to help.
|
@mjauvin , sorry, have edited the last post |
Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
Just updated the working Winter CMS 1.2.1 with
composer update and winter:up
commands, and it's broken now.The last update I did was about two months ago.
Steps to replicate
So, I get the
An exception has been thrown during the rendering of a template ("Undefined array key "about"") in "C:\laragon\www\winter3\themes\mytheme\partials\intro.htm" at line 3.
intro.htm
points tohero1.htm
whichpost list component
:As I understand the error is pointing to
categoryPage = "about"
part.Before the update, it was working
Workaround
No response
The text was updated successfully, but these errors were encountered: