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

CLDR Ticket #9845(closed survey: fixed)

Opened 13 months ago

Last modified 5 weeks ago

Preserve past forum discussions

Reported by: kristi Owned by: srl
Component: survey Data Locale:
Phase: dsub Review: emmons
Weeks: Data Xpath:
Xref:

Description (last modified by kristi) (diff)

i.Support historic forum discussions

ii.Color code past discussions

iii.Show link to an item with an indication for a broken link if the item no longer exists.

Attachments

cldr-old-forum-posts.diff (12.9 KB) - added by srl 6 months ago.
patches
prevforum.js (3.9 KB) - added by srl 6 months ago.
WebContent/js/special/prevforum.js
OldForumPostsButtonClickResult.png (78.5 KB) - added by pedberg 6 months ago.
OldForumPostsButtonAppears.png (105.4 KB) - added by pedberg 6 months ago.

Change History

comment:1 Changed 13 months ago by kristi

  • Owner changed from anybody to kristi
  • Status changed from new to design
  • Milestone changed from UNSCH to 31

comment:2 Changed 12 months ago by kristi

Requirements discussed:

  1. See votes and suggestions from the last contribution.
  2. Final released data.
  3. Continue to see the forum threads.
  4. Concerns with another public Ref environment: Multiple environments causing confusing in the future and maintenance.
  5. How do we handle the environment for the Spring release with no votes/suggestion

comment:3 Changed 9 months ago by kristi

  • Owner changed from kristi to fredrik
  • Status changed from design to accepted

comment:4 Changed 9 months ago by fredrik

  • Type changed from unknown to survey
  • Component changed from unknown to survey
  • Milestone changed from 31 to 32

comment:5 Changed 7 months ago by kristi

  • Owner changed from fredrik to srl
  • Description modified (diff)
  • Summary changed from Survey tool data does not reflect the final release data until after the release to Preserve past forum discussions

comment:6 Changed 7 months ago by kristi

updated the summary and the description per discussion at CLDR TC meetup on 3/28

comment:7 Changed 7 months ago by emmons

  • Priority changed from assess to critical

comment:8 Changed 7 months ago by srl

srl notes:

  • use a view to aggregate, something like create view CLDR_FORUM_ALL as (SELECT * from CLDR_FORUM_POSTS_31) UNION (SELECT * from CLDR_FORUM_POSTS_30)
  • …but prefix the release to create a unique id: 31:12345

The issue here is that forum posts are in separate tables:

CLDR_FORUM_POSTS_30

idsubject
1so about those separators
2Re: so about those separators

CLDR_FORUM_POSTS_31

idsubject
1time separators redux
2Not again! was: Re: time separators redux

so what I'm trying to do is figure out hwo to make a view that aggregates these posts…

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

comment:9 Changed 6 months ago by gregsla

In standard SQL you can have a view like this:

create view New_Combined_ForumPosts as
select "30:" + cast(id as char) as newID, subject from CLDR_FORUM_POSTS_30
union
select "31:" + cast(id as char) as newID, subject from CLDR_FORUM_POSTS_31

I think you do have to hard-code the newID prefix, which will be part of a character field. You can add other columns, too, of course.

If there are a large number of records in both tables, this view may not be very performant and only creating a new table with a real primary key would help.

Changed 6 months ago by srl

patches

Changed 6 months ago by srl

WebContent/js/special/prevforum.js

comment:10 Changed 6 months ago by srl

Ignore the commits. prevforum.js is a delta of forum.js

comment:11 Changed 6 months ago by pedberg

  • Cc srl, fredrik, emmons, kristi, pedberg added

OK, I added tools/cldr-apps/WebContent/js/special/prevforum.js to CLDR trunk (from the attached file) and also rolled in the diffs in cldr-old-forum-posts.diff​. ST passes locale tests with those, and smoketest seems to run. I was not able to test the button for old posts immediately (where would I find it), and by the time I came back later to test it, smoketest had gone offline for other reasons (SQL exception related to annotations, it was already doing that before this change). Need to wait for smokiest to come up before I can test further. Maybe after a change for another ticket that results in a new smokiest being posted and started.

So the diff that is now relevant for this is just r13437.

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

Changed 6 months ago by pedberg

comment:12 Changed 6 months ago by pedberg

I tried this on smoketest as of r13444 (running in Safari 10.1 on macOS 10.12.4). The Old Forum Posts link does appear, as shown in the first attached screenshot "OldForumPostsButtonAppears.png​" http://unicode.org/cldr/trac/attachment/ticket/9845/OldForumPostsButtonAppears.png. When I click on that, I get the result in the second attached screenshot "OldForumPostsButtonClickResult.png​" http://unicode.org/cldr/trac/attachment/ticket/9845/OldForumPostsButtonClickResult.png:

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://cldrubs14-test1.cloudapp.net/smoketest/v#prevforum/nb//
undefined
 The error message was: 
SyntaxError: JSON Parse error: Unrecognized token '<'

Is the old forum data perhaps in XML and needing to be converted to JSON?

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

Changed 6 months ago by pedberg

comment:13 follow-up: ↓ 14 Changed 6 months ago by srl

Short answer: It's because the "CLDR 30" forum posts don't exist for smoketest. I'll try to create some from the sql console.

Long answer:

HTTP Status 500 - SurveyForum: Couldn't show posts in forum aa - SQL exception:

type Exception report

message SurveyForum: Couldn't show posts in forum aa - SQL exception:

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

exception

java.lang.RuntimeException: SurveyForum:  Couldn't show posts in forum aa - SQL exception: 
  -
 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cldrdb.cldr_forum_posts_30' doesn't exist
 Stack: 
 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'cldrdb.cldr_forum_posts_30' doesn't exist
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2501)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1966)
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
	at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
	at org.unicode.cldr.web.DBUtils.sqlQueryArrayArrayObj(DBUtils.java:1118)
	at org.unicode.cldr.web.SurveyForum.toJSON(SurveyForum.java:2080)
	at org.unicode.cldr.web.SurveyAjax.processRequest(SurveyAjax.java:823)
	at org.unicode.cldr.web.SurveyAjax.doGet(SurveyAjax.java:302)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1223)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
 - fGetByLoc
	org.unicode.cldr.web.SurveyForum.toJSON(SurveyForum.java:2150)
	org.unicode.cldr.web.SurveyAjax.processRequest(SurveyAjax.java:823)
	org.unicode.cldr.web.SurveyAjax.doGet(SurveyAjax.java:302)
	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.28 logs.

Apache Tomcat/8.0.28

comment:14 in reply to: ↑ 13 Changed 6 months ago by srl

Replying to srl:

Short answer: It's because the "CLDR 30" forum posts don't exist for smoketest. I'll try to create some from the sql console.

I’ve now created cldr_forum_posts_30. it's empty.

comment:15 Changed 6 weeks ago by srl

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

comment:16 Changed 6 weeks ago by srl

code is already merged to trunk. please review

comment:17 Changed 5 weeks ago by emmons

  • 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.