gawati / gawati-editor-ui

Gawati Client
GNU Affero General Public License v3.0
0 stars 0 forks source link

Cannot read property "refersTo"; of undefined at gawatiDates.find #15

Open ccsmart opened 6 years ago

ccsmart commented 6 years ago

request:

POST /gwc/documents HTTP/1.0 Host: localhost:9102 Accept: application/json, text/plain, / Origin: https://data.dev.gawati.org User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Content-Type: application/json;charset=UTF-8 Referer: https://data.dev.gawati.org/_lang/en/dashboard Accept-Encoding: gzip, deflate, br Accept-Language: en,en-US;q=0.9,de-DE;q=0.8,de;q=0.7 X-Forwarded-For: 109.164.203.165 X-Forwarded-Host: data.dev.gawati.org X-Forwarded-Server: data.dev.gawati.org Content-Length: 54

{"data":{"docTypes":"all","itemsFrom":1,"pageSize":5}}


response:

HTTP/1.1 500 Internal Server Error X-Powered-By: Express Content-Security-Policy: default-src 'self' X-Content-Type-Options: nosniff Content-Type: text/html; charset=utf-8 Content-Length: 1337 Date: Fri, 04 May 2018 07:28:06 GMT Connection: close

<!DOCTYPE html>

Error
TypeError: Cannot read property 'refersTo' of undefined
   at gawatiDates.find (/home/gawatidevclientsrv/portal/utils/AknHelper.js:19 :30)
   at Array.find (native)
   at Object.getGawatiNamedDate (/home/gawatidevclientsrv/portal/utils/AknHelper.js:18:35)
   at formStateFromAknDocument (/home/gawatidevclientsrv/portal/documentmanage.js:238:49)
   at getOnlineDocumentFromAknObject (/home/gawatide vclientsrv/portal/documentmanage.js:273:18)
   at packages.map (/home/gawatidevclientsrv/portal/documentmanage.js:314:24)
   at Arra y.map (<anonymous>)
   at convertAknXmlToObjects (/home/gawatidevclientsrv/portal/documentmanage.js:313:31)
   at Layer.handle [as handle_request] (/home/gawatidevclientsrv/portal/node_modules/express/lib/router/layer.js:95:5)
   at next (/home/gawatidevclientsrv/portal/n ode_modules/express/lib/router/route.js:137:13)
   at axios.then (/home/gawatidevclientsrv/portal/documentmanage.js:336:13)
   at &l t;anonymous>
   at process._tickCallback (internal/process/next_tick.js:188:7)
kohsah commented 6 years ago

@ccsmart sample data is out of sync. There were structural changes to the document will update

kohsah commented 6 years ago

All the the @refersTo attribtues for dates in the document start wtih #doc.... instead of the previous #dc...