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

The "Data error" occured during load data to a dashlet #6

Open
Zanzarchik opened this issue Sep 21, 2016 · 2 comments
Open

The "Data error" occured during load data to a dashlet #6

Zanzarchik opened this issue Sep 21, 2016 · 2 comments
Labels

Comments

@Zanzarchik
Copy link

Hi!

I faced with this problem on the Alfresco 4.2f.

TC:

  1. Set following settings in alfresco-global.properties file:
    audit.enabled=true
    audit.alfresco-access.enabled=true
    audit.tagging.enabled=true
    audit.dod5015.enabled=false
    audit.alfresco-access.sub-actions.enabled=true
    audit.filter.alfresco-access.default.enabled=false
  2. Restart Alfresco to applay this change
  3. Login as admin user
  4. Enable audit dashlet
  5. Create any content

ER: the "CREATE" action and other actions should display in the audit dashlet
AR: the "Data error" occurred

Root cause:
YAHOO.lang.JSON.useNativeParse set to true and Native.parse doesn't correct work with CREATE action JSON representation.

I fixed this by adding:
YAHOO.lang.JSON.useNativeParse = false;

to audit-application.js

But I think this is only WA and needs more effecient solution.

Please, fix this :)

@romainguinot
Copy link
Member

Hi,

It's been years since i worked on this so my memory is a bit vague.
From the commit log i see 0.54 used the native JSON.parse and 0.55 switched back to using the previous, alfresco-provided, JSON parsing utility rather than JSON.parse, which is not available in all supported versions for this dashlet (that was the only change between the two releases)

It was a compromise to have a solution that works for all supported Alfresco versions.
4.2.f is also quite old.

It's unlikely i'll have time to investigate so if you can try with 0.54 or 0.55 and see if that makes a difference for you with JSON.parse (if it's available in your version/environment) ?

YAHOO.lang.JSON.useNativeParse would make the parser environment-specific so it doesn't sound like it can be generalized to everyone.

Would be good as well if you can investigate the raw JSON and see what the parser does not like.

Thanks,
Romain.

@romainguinot
Copy link
Member

FYI i just tried on the latest release of Alfresco, 5.1.1 and the 0.55 dashlet, with your config, can't reproduce your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants