Bug 32857 - JavaScript error for unmapped UDM syntax types
JavaScript error for unmapped UDM syntax types
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.x
Assigned To: UMC maintainers
:
Depends on: 32856
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-14 13:54 CEST by Arvid Requate
Modified: 2017-08-08 07:09 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-10-14 13:54:09 CEST
Currently univention-management-console-module-udm/umc/python/udm/syntax.py does not map the UDM syntax base class "Upload" to any widget. Maybe this would be useful apart from the more general issue of Bug #32856.



+++ This bug was initially created as a clone of Bug #32856 +++

Using a syntax which is not mapped to a UMC widget (e.g., Bzip2Base64Upload), one will obtain a JavaScript error and the UDM object cannot be opened:

> "TypeError: Cannot call method 'indexOf' of undefined

This behaviour is due to the mapping logic in udm/DetailPage.js:

> ...
> if ( iprop.id.slice( 0, 1 ) == '$' && iprop.id.slice( -1 ) == '$' ) {
>   properties.push(iprop);
>   return;
> }
> if ( 'LinkList' == iprop.type ) {
>   iprop.multivalue = false;
> } else if ( iprop.type.indexOf('MultiObjectSelect') >= 0 ) {
> ...

In this case, type is undefined.
Comment 1 Alexander Kläser univentionstaff 2013-10-14 13:58:57 CEST
It would also be nice to allow common image types (png, svg, svgz) apart from jpeg in the ImageUpload widget (→ this limitation can be tracked down to the Image widget). Simply mapping the first base64 bytes to a mime-type should do the trick!?

I can already upload a PNG image which will be rendered with a JPG mime type, see also:

> http://stackoverflow.com/questions/10302689/determine-image-type-from-base-64-content

Nevertheless, SVG/SVGZ does not seem to be rendered properly in this way.
Comment 2 Stefan Gohmann univentionstaff 2017-06-16 20:35:04 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 3 Stefan Gohmann univentionstaff 2017-08-08 07:09:18 CEST
This issue has been filed against UCS 3.1.

UCS 3.1 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.