-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Keep the blocks into the page rendering even if some blocks does not exist #1609
Comments
Did you try with kernel.debug false? AFAIK there is some logic on SonataBlockBundle to avoid exceptions when kernel.debug is false. |
I can try this, But I remember to took this issue in production once! |
Hey @jordisala1991 you are right, the page doesn't crash with debug=false But any block is rendered, I have a simple text block and it doesn't appear into the page :/ I guess it should skip only blocks that doesn't exist! |
Indeed, there is something wrong then. |
and ... does it an impediment for release 4.0 👀 ? |
Does it depend on the order? Maybe if you place first the block that works and later the one that does not work? |
other question, should it be handled in sonata block or here? |
The same issue, O moved |
I have never seen this problem. What does it mean when you say the block does not exist? How did you end up in this situation? |
Upgrading from3.x to 4.x will cause some blocks to be removed, so you might end up in that situation easily if you rely on default Sonata blocks |
|
or do this 😄 |
Ok just to make sure, I keep this ticket open, But it's not a impediment for 4.x anymore correct @VincentLanglet @jordisala1991 ? |
It will kinda solved since you'll be able to do it with the exception manager strategy |
for me I still have the same issue, even if I use manager strategy |
Hey @VincentLanglet what do you mean "I recommend you dump the strategy code" sonata-project/SonataBlockBundle#1117 (comment)
I don't know what I should change :/, could you test it create email block in 3.x and switch for 4.x again? |
I mean to debug, like I did. I went into my vendor, used xdbug/dump() methods, and I looked where the code was executed, which method, and
That's exactly the behavior expected since
So like I already said many times, the best hypothesis so far is the fact you don't have the right configuration.
No cause, I already passed too much time having to configure a db, create things etc. |
Ok, then I'm checking the first 2 issues as solved ;) |
Screen.Recording.2022-09-27.at.09.59.14.movI can delete the block that doesn't exist from block's edit page ❤️ But from |
This batch issue will be solved in this PR: sonata-project/SonataDoctrineORMAdminBundle#1695 for composer page I would say it's not a big problem, because if some block doesn't exist, the user can remove in block list. IMO we can check this issue as solved |
the current code in 3.x and 4.x is crashing the whole page when the block doesn't exist, I faced this issue few months ago, and It should be fixed here.
My idea is, check if the block class still exist, if not log into the logs and jump for the next block to be rendered.
ACs
Note: It's just an example, it can happen with any block that doesn't exist for example, if you rename some block that already exist!
Exception
The text was updated successfully, but these errors were encountered: