Skip to content
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

Giving an invalid view for an app makes the "edition" button disappear from change-layout hover menu #3475

Open
6TELOIV opened this issue Sep 27, 2024 · 3 comments

Comments

@6TELOIV
Copy link
Contributor

6TELOIV commented Sep 27, 2024

I'm submitting a

[x] bug report
[x] feature request

...about

[x] edit experience / UI
[x] admin experience UI

Current Behavior / Expected Behavior

With the new polymorphism selection where you can type whatever you want, invalid values are allowed, and if there is no default (non-polymorph) view, then the user cannot restore their function without resetting their cookies.

I think the correct behavior would be to either give the default/fallback view a reserved name like default or noname, and validate before storing the cookie that the view selected is valid.

Alternatively, could add some code that on error if the polymorph cookie is set, add a button to clear the cookie above/below the error.

One more option would be ensuring that the polymorph picking button is always available if the cookie is set.

Last option, change the UI for how the polymorph is selected to be an actual select/dropdown that contains only valid entries.

Instructions to Reproduce the Problem

  1. Make an app with view polymorphism.
  2. Hover on the View picker, and type in an invalid view name
    image
    image
  3. You will see an error (this part is expected)
    Error: ToSic.Sxc.Engines.RenderingException: The template file '/Portals/0/2sxc/App1/Default.cshtml🎯' does not exist
  4. You now will not be able to change back to a valid view polymorph:
    image

Your environment

  • 2sxc version(s): 2sxc v.17.09.00
  • Browser: all
  • DNN: all
  • Hosting platform: all
  • Language: any/all
@iJungleboy
Copy link
Contributor

thanks for this ;)

It's still a bit beta.

if you did this, just look for the cookie and delete it for now.

@iJungleboy
Copy link
Contributor

BTW: congrats to discovering this feature - it hasn't really been released yet ;)

@6TELOIV
Copy link
Contributor Author

6TELOIV commented Sep 28, 2024

Cool! Yeah, I found the cookie, I tested it on a local DNN installation cause I didn't wanna break prod haha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants