-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Isn't injected into UserDefinedForm pages #47
Comments
Hi @purplespider looks like #46 is related. I pushed up a fix a while ago (tweaked it this morning) that I think should help you - would you be able to try this branch and report back if it solves the problem for you? |
Thanks, Jono. just tried the fix-46 branch, and while you no longer get a JS error in the console on User Form pages, Better Navigator still doesn't appear. Displays on other pages fine. Tested on fresh Silverstripe 4.6.0 and latest UserForms 5.6.0. |
Interesting. I don't use UserForms myself so I may not get a chance to debug this further for now, sorry. If you're able to look in to it more let me know what you find! |
I went further down the rabbit hole this morning. Problem seems to be that the result of Controller::handleAction() can be all kinds of things, including a Controller (API says only The API documentation is pretty far off here, like RequestHandler::handleAction() says they only thing it can return is a HTTPResponse, but that conflicts with reality and comments in the code. I don't see an extension point we can use at an appropriate point in the response pipeline to solve this issue but maybe there's a middleware we can use to check for a HTML response really late in the pipeline? @unclecheese would really value your input here. (Side note: this is why I insisted on tagging a major release for that seemingly innocent change 😅) @purplespider can you please try installing v4 instead of v5 and see if that fixes the problem for you. You'll need to put |
@purplespider possibly just changing UserForms to render the result would fix the issue for you. Change this part to
I guess that would probably constitute a breaking change though 🤷 |
Thanks for looking into this further, Jono.
Yep, I can confirm that v4 works fine on UserForms pages.
Yep, this makes v5 work! |
I think the solution for this is going to be re-adding support for In the |
That sounds sensible to me, Jono! Thanks. |
Better Navigator doesn't currently seem to work on
UserDefinedForm
pages.Looks like the
instance of DBHTMLText
check is failing on these pages, so the HTML isn't getting injected:https://github.com/jonom/silverstripe-betternavigator/blob/master/src/Extension/BetterNavigatorExtension.php#L54
That's as far as I managed to get in debugging it!
The text was updated successfully, but these errors were encountered: