-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Improve error for missing (Translate)CustomTagBlock template #35829
Comments
Update: I was able to demonstrate that the blocks do work on master and in Redwood. It just takes manual OLX editing in order to set up each custom_tag impl that you want to use. Essentially, a The TranslateCustomTagBlock is just a thin wrapper that turns This is all spelled out in docstrings but it would be good to:
Sample OLX: customtags.tar.gz Here it is in Redwood Studio: And Redwood LMS: |
What is the value / potential use for this block I am still not fully sure I follow the value of this tag / block. (Anybody know of its use previously? ) |
@marcotuts It theoretically provides some convenience and semantic value for course authors working with HTML. An author can say in one place (the template): "given inputs X Y and Z, this is the HTML to display a Blarg component ", and then they can reuse that Blarg template throughout the course with any X/Y/Z inputs they want. If they ever want Blarg to render differently, they only have to change the template, not all the usages. I would not propose this as a new Core feature today, but we should keep it working as part of our longstanding goal of Do Not Break OLX Content. The context to this bug report is actually that we are extracting a bunch of XBlocks into plugins, including this one. Once extracted, it'll be extremely low-cost to maintain. |
Aha interesting! Tiny MCE actually has this templates idea built into itself as a plugin tool |
Currently, when an instance of a CustomTagBlock (or of its wrapper block, TranslateCustomTagBlock) does not have a matching template in the OLX at
course/custom_tags/TAGNAME
, a very opaque and confusing error message is displayed in Studio and in LMS/CMS logs.We could make this situation better for course author and developers by explaining which template file is missing. It would be good if the Studio error was displayed in such a way that the block could still be edited or deleted.
(In addition to this, we would like to add an instance of this block to the test course)
(ORIGINAL ERROR REPORT)
We are trying to figure out the last time that CustomTagBlock and TranslateCustomTagBlock worked in LMS and in Studio. (UPDATE: They actually work in master. See my comment below).
@farhan first noticed this as an existing issue while trying to convert customtag's Sass to CSS. The errors he saw on CustomTagBlock are:
@kdmccormick sees these NoSuchViewError for TranslateCustomTagBlock, both in LMS (these logs) and CMS (not shown):
In Studio, this looks like:
When was the last time this block worked?
Potentially relevant PRs:
The text was updated successfully, but these errors were encountered: