0

Failed to process cannot read property 'parent' of null(typeerror)

asked 2017-05-19 11:24:46 +0800

sebjose gravatar image sebjose
101 1

I am using zk 7.0.4 jar in SAP hybris backoffice. when I click a "+" button of a collection popup

I get the below error. Please find the attached screens. What could be the possible reason for this?

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2017-05-19 15:27:34 +0800

chillworld gravatar image chillworld flag of Belgium
5143 3 9
https://github.com/chillw...

Because you are asking in javascript the parent of a component what is null.
The reason for this is with this question very hard to see and you should check with developer tools where this error comes from.

link publish delete flag offensive edit

answered 2017-05-22 06:44:35 +0800

cor3000 gravatar image cor3000
3446 1 7
ZK Team

Hi sebjose,

we can't help about SAP hybris in this forum (so please contact your support there). In case this problem also happens with pure ZK without SAP hybris, can you please post the details again (I increased your karma so you should be able to attach files or link details)

Robert

link publish delete flag offensive edit

answered 2017-05-22 11:46:23 +0800

sebjose gravatar image sebjose
101 1

updated 2017-05-22 19:11:05 +0800

Hi @Robert.

Thanks for your understanding and time. Since SAP hybris uses ZKOSS for developing its backoffice & cockpit components i raised the query here. Sorry if this is the wrong place. I am attaching the images and chrome developer tools console logs

zk.wpd:23 Uncaught TypeError: Cannot read property 'parent' of null at x._isChildOf (ckez.wpd:1023) at x.onVParent (ckez.wpd:1023) at n (zk.wpd:13) at x.fire (zk.wpd:13) at o (zk.wpd:13) at Object.fire (zk.wpd:13) at Object.fire (zk.wpd:16) at x.open (zk.wpd:81) at x.open (zk.wpd:133) at Object.invoke (zk.wpd:23)!

image description image description

Thanks Sebin Jose

link publish delete flag offensive edit

answered 2017-05-23 03:04:07 +0800

cor3000 gravatar image cor3000
3446 1 7
ZK Team

updated 2017-05-23 05:43:04 +0800

Thanks again for the screenshot and the stack trace. Now we are a step closer...

ckez.wpd

indicates a problem happening in the CkEditor widget

open / onVParent

indicate something happening in combination with a popup or tooltip.

Cannot read property 'parent' of null

Is the similar to a NullPointerException happening somewhere in the _isChildOf method

https://github.com/zkoss/zkckeditor/blob/master/ckez/src/archive/web/js/ckez/CKeditor.js#L225-L235

How it gets to this state I can't tell at the moment... can you please state your ckeditor version used in your case? You can check it using the following JS call at your Browser's developer console:

zk.getVersion('ckez')

e.g. "4.4.6.3" (printed in my case)

Based on that we can try to isolate the problem in zkfiddle without SAP Hybris around it.

link publish delete flag offensive edit

answered 2017-05-23 14:30:23 +0800

sebjose gravatar image sebjose
101 1

Hi @Robert,

Thanks for the reply. I executed the code in Developer Console, it printed "4.0". Also, for your information the backoffice application was idle after server start for more than a day there was no action/event .Post login after a day , on click of "+" i got the error. Thanks Sebin Jose

link publish delete flag offensive edit

answered 2017-05-24 04:08:40 +0800

cor3000 gravatar image cor3000
3446 1 7
ZK Team

unfortunately 4.0 doesn't mean a lot due to ZKCK-21, so it could mean anything between 4.0.1.0 and 4.4.6.1

I tried this simple example which goes through that code without causing that issue.

<zk>
  <button popup="pop" label="open popup with editor"/>
  <popup id="pop">
    <div>
        <ckeditor/>
    </div>
  </popup>
</zk>

Can you try this in your environment, maybe it already fails. Otherwise your '+' button is doing something different I am not aware of. In this case I'd need the details of what UI changes this button is causing. This information is found in the AJAX response body of the request containing the click event.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2017-05-19 11:24:46 +0800

Seen: 36 times

Last updated: May 24