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

When importing sitemap code into UI sitemap // coments cause errors #2043

Closed
ubeaut opened this issue Aug 28, 2023 · 0 comments · Fixed by #2045
Closed

When importing sitemap code into UI sitemap // coments cause errors #2043

ubeaut opened this issue Aug 28, 2023 · 0 comments · Fixed by #2045
Labels
bug Something isn't working main ui Main UI

Comments

@ubeaut
Copy link

ubeaut commented Aug 28, 2023

The problem

I just tried pasting in my old sitemap and it worked after I took out all my comments I had in it.
The new UI version of sitemap doesn’t seem to like // as a comment.
It also didn’t like spaces after the = sign like this Frame label= “Power”

Expected behavior

It should seamlessly import the sitemap.

Steps to reproduce

Copy the file sitemap code and paste it into the code tab of the UI sitemap.
If the imported code has // comments in it then you will see errors.

Your environment

Browser console

Browser network traffic

Additional information

Discussion about this is here and there was a request to open an issue for this problem:
https://community.openhab.org/t/what-is-the-most-common-ui-you-are-using/149096/17

@ubeaut ubeaut added bug Something isn't working main ui Main UI labels Aug 28, 2023
@ghys ghys closed this as completed in #2045 Sep 5, 2023
ghys pushed a commit that referenced this issue Sep 5, 2023
Fixes #2043

The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.

Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
stefan-hoehn pushed a commit to stefan-hoehn/openhab-webui that referenced this issue Sep 23, 2023
Fixes openhab#2043

The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.

Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
digitaldan pushed a commit to digitaldan/openhab-webui that referenced this issue Sep 24, 2023
Fixes openhab#2043

The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.

Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant