[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #11141(closed: fixed)

Opened 6 months ago

Last modified 4 months ago

ST: crash on login for this user

Reported by: fredrik Owned by: tbishop
Component: survey-backend Data Locale:
Phase: dsub Review: srl
Weeks: Data Xpath:
Xref:

Description (last modified by srl) (diff)

Our user #1023 gets a crash every time he tries to login:

Problem with the SurveyTool

An error occurred while trying to 'process your request', and the error code is 'E_UNKNOWN'.
Reloading may resume your progress.

Details
http://st.unicode.org/cldr-apps/v#locales///
Could not fetch initial menus for - error RequestError / Unable to load /cldr-apps/SurveyAjax?_=und&s=REDACTED&what=menus&locmap=true&cacheKill=1527542642478 status: 500

HTTP Status 500 - Dtd ldml doesn’t allow element=annotationPattern, attribute: type
type Exception report

message Dtd ldml doesn’t allow element=annotationPattern, attribute: type

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.unicode.cldr.util.DtdData$IllegalByDtdException: Dtd ldml doesn’t allow element=annotationPattern, attribute: type

org.unicode.cldr.util.DtdData.getAttributeStatus(DtdData.java:1198)
org.unicode.cldr.util.DtdData.isDistinguishing(DtdData.java:1118)
org.unicode.cldr.util.CLDRFile.isDistinguishing(CLDRFile.java:1390)
org.unicode.cldr.util.CLDRFile$DistinguishedXPath.getDistinguishingXPath(CLDRFile.java:2929)
org.unicode.cldr.util.CLDRFile.getDistinguishingXPath(CLDRFile.java:1293)
org.unicode.cldr.util.XMLSource.getValueAtPath(XMLSource.java:513)
org.unicode.cldr.util.CLDRFile.getStringValue(CLDRFile.java:577)
org.unicode.cldr.web.SurveyAjax.importAllOldWinningVotes(SurveyAjax.java:2106)
org.unicode.cldr.web.SurveyAjax.doAutoImportOldWinningVotes(SurveyAjax.java:2053)
org.unicode.cldr.web.SurveyAjax.processRequest(SurveyAjax.java:912)
org.unicode.cldr.web.SurveyAjax.doGet(SurveyAjax.java:308)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1223)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.30 logs.

Apache Tomcat/8.0.30

url: /cldr-apps/SurveyAjax?_=und&s=REDACTED&what=menus&locmap=true&cacheKill=1527542642478

Reload

Attachments

Skärmavbild 2018-05-29 kl. 10.54.28.png (260.9 KB) - added by fredrik 6 months ago.
error message
CLDR bug 11141 Screen Shot 1 2018-05-29.png (367.8 KB) - added by tbishop 6 months ago.
Logging in as user 1023 on smoketest after change to catch exception
CLDR bug 11141 Screen Shot 2 2018-05-29.png (33.8 KB) - added by tbishop 6 months ago.
Successful auto-import for user 1023 on smoketest after change to catch exception

Change History

Changed 6 months ago by fredrik

error message

comment:1 Changed 6 months ago by tbishop

  • Owner changed from anybody to tbishop
  • Status changed from new to accepted

comment:2 follow-up: ↓ 3 Changed 6 months ago by tbishop

This looks fixable by adding this to importAllOldWinningVotes in SurveyAjax.java:

            } catch (IllegalByDtdException ix) {
                SurveyLog.logException(ix, "Illegal by DTD: Trying to vote for " + xpathString);
            }

comment:3 in reply to: ↑ 2 Changed 6 months ago by srl

Replying to tbishop:

This looks fixable by adding this to importAllOldWinningVotes in SurveyAjax.java:

            } catch (IllegalByDtdException ix) {
                SurveyLog.logException(ix, "Illegal by DTD: Trying to vote for " + xpathString);
            }

Yes, but why? From the look of it, it sounds like we've made an incompatible change to our DTD that breaks old CLDR versions. This should not happen.

Last edited 6 months ago by srl (previous) (diff)

comment:4 Changed 6 months ago by srl

select * from cldr_xpaths where xpath like '%annotationPattern%'

||681790|//ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="keycap"]|
||681791|//ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="flag"]|
||681792|//ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="combined"]|
||681793|//ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="emoji"]|

but i don't see this in the DTD. I see it in the coverage data and pathheader, but not in the dtd.

comment:5 Changed 6 months ago by srl

  • Description modified (diff)

comment:6 Changed 6 months ago by srl

  • Description modified (diff)

comment:7 follow-up: ↓ 8 Changed 6 months ago by tbishop

I made that change and tested on localhost. Logged in as user #1023, IllegalByDtdException is caught:

SURVEY_EXCEPTION Illegal by DTD: Trying to vote for //ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="keycap"]
...
*** MESSAGE org.unicode.cldr.util.DtdData$IllegalByDtdException: Dtd ldml doesn’t allow element=annotationPattern, attribute: type Dtd ldml doesn’t allow element=annotationPattern, attribute: type
*** STACK org.unicode.cldr.util.DtdData.getAttributeStatus(DtdData.java:1198)
org.unicode.cldr.util.DtdData.isDistinguishing(DtdData.java:1118)
org.unicode.cldr.util.CLDRFile.isDistinguishing(CLDRFile.java:1390)
org.unicode.cldr.util.CLDRFile$DistinguishedXPath.getDistinguishingXPath(CLDRFile.java:2929)
org.unicode.cldr.util.CLDRFile.getDistinguishingXPath(CLDRFile.java:1293)
org.unicode.cldr.util.XMLSource.getValueAtPath(XMLSource.java:513)
org.unicode.cldr.util.CLDRFile.getStringValue(CLDRFile.java:577)
org.unicode.cldr.web.SurveyAjax.importAllOldWinningVotes(SurveyAjax.java:2107)
Last edited 6 months ago by tbishop (previous) (diff)

comment:8 in reply to: ↑ 7 Changed 6 months ago by srl

in r12841 Mark removed annotationPatterns from the DTD. This should perhaps have been deprecated instead. https://unicode.org/cldr/trac/changeset/12841/trunk/common/dtd/ldml.dtd

comment:9 Changed 6 months ago by tbishop

Options:

  • catch the exception
  • change ldml.dtd
  • both?

I assigned myself the ticket on the assumption that this was follow-up to the auto-import feature; happy to be un-assigned if it involves DTD issues I'm not familiar with...

Last edited 6 months ago by tbishop (previous) (diff)

comment:10 Changed 6 months ago by tbishop

I've committed the change to trunk in revision [14171]. Just catch the exception for now.

Changed 6 months ago by tbishop

Logging in as user 1023 on smoketest after change to catch exception

Changed 6 months ago by tbishop

Successful auto-import for user 1023 on smoketest after change to catch exception

comment:11 Changed 6 months ago by srl

I approve r14171, consider it reviewed. this will log the exception but not block the auto import/login.

comment:12 Changed 6 months ago by srl

No mention in the DTD, but annotationPatterns are in these files:

java/org//unicode/cldr/icu/ldml2icu_dir_mapping.txt:/annotationPatterns/     ; lang
java/org//unicode/cldr/icu/ldml2icu_locale.txt://ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="(%A)"] ; /codePatterns/$1
java/org//unicode/cldr/util/data/PathDescription.txt:^//ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="([^"]*)"]    ;   The pattern to be used when displaying a {1}. For more information, please see http://cldr.org/translation/localepattern.
java/org//unicode/cldr/util/data/PathHeader.txt://ldml/localeDisplayNames/annotationPatterns/annotationPattern[@type="%A"] ; Characters ; Category ; Link ; $1
java/org//unicode/cldr/util/data/Placeholders.txt:^//ldml/localeDisplayNames/annotationPatterns/annotationPattern\[@type="emoji"] ; {0}=EMOJI_NAME person frowning
java/org//unicode/cldr/util/data/Placeholders.txt:^//ldml/localeDisplayNames/annotationPatterns/annotationPattern\[@type="flag"] ; {0}=COUNTRY_NAME United States, France
java/org//unicode/cldr/util/data/Placeholders.txt:^//ldml/localeDisplayNames/annotationPatterns/annotationPattern\[@type="keycap"] ; {0}=KEYCAP_NAME 1, asterisk
java/org//unicode/cldr/util/data/Placeholders.txt:^//ldml/localeDisplayNames/annotationPatterns/annotationPattern\[@type="combined"] ; {0}=SEQUENCE_OF_NAMES man, woman, boy

comment:13 Changed 6 months ago by emmons

  • Priority changed from assess to critical
  • Milestone changed from UNSCH to 34

comment:14 follow-up: ↓ 15 Changed 5 months ago by mark

Tom, I think this one is done, right? Steven already signed off on it.

comment:15 in reply to: ↑ 14 Changed 5 months ago by tbishop

Replying to mark:

Tom, I think this one is done, right? Steven already signed off on it.

Yes.

comment:16 Changed 4 months ago by tbishop

  • Status changed from accepted to reviewing
  • Review set to fredrik

comment:17 Changed 4 months ago by tbishop

  • Review changed from fredrik to srl

comment:18 Changed 4 months ago by fredrik

  • Status changed from reviewing to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.