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

submitContentEdit dontShowFields behavior #2992

Closed
ah-arch opened this issue Jun 3, 2013 · 2 comments
Closed

submitContentEdit dontShowFields behavior #2992

ah-arch opened this issue Jun 3, 2013 · 2 comments

Comments

@ah-arch
Copy link

ah-arch commented Jun 3, 2013

  1. When $dontShowFields is set for a radio field, i.e. #set($dontShowFields = "radioField") , the #submitContentEdit form cannot be submitted as content_form_macro.js's radioValid() function will never return true. The browser console shows:
"Uncaught TypeError: Cannot read property 'name' of undefined" at: customErrorMessages[element[0].name]

It appears that element.name would work but not element[0].name.

  1. When dontShowFields is set for a binary/image field, i.e. #set($dontShowFields = "thumbnail"), the resulting HTML is unusable:
<dd id="thumbnailFieldInput" class="formFieldInput">
<input type="hidden" name="thumbnail" id="thumbnail" value="com.dotmarketing.viewtools.content.FileAssetMap@3c4e9ea7[metaData={" imageheight":"85="" pixels","jpegcomment":"creator:="" gd-jpeg="" v1.0="" (using="" ijg="" jpeg="" v62),="" quality="75&quot;,&quot;component3&quot;:&quot;Cr" component:="" quantization="" table="" 1,="" sampling="" factors="" 1="" horiz="" vert","tiffbitspersample":"8","component1":"y="" 0,="" 2="" vert","yresolution":"1="" dot","width":"121","resolutionunits":"none","component2":"cb="" vert","contenttype":"image="" jpeg","wcomments":"creator:="" bits","filesize":"2439","height":"85","numberofcomponents":"3","xresolution":"1="" dot","tiff:imagewidth":"121","comment":"creator:="" pixels"},path="&lt;null">,map={fileAsset=C:\...jpg, host=3aeb786b-c009-4108-85e1-1b64540af7fa, sortOrder=0, stInode=33888b6f-7a8e-4069-b1b6-5c1aa9d0a48d, showOnMenu=false, lastReview=null, ...jpg=...jpg, languageId=1, disabledWYSIWYG=[], folder=12b3255d-3368-4580-80bd-047dcc5cb87e, reviewInternal=null, nextReview=null, modDate=2013-05-09 11:02:04.0, owner=dotcms.org.1, modUser=dotcms.org.1, inode=56b98b63-7772-48ff-88a9-0c8e89371b75, identifier=d723cdb5-3e0c-490d-be48-42c603ac91f7},lowIndexPriority=false]"&gt;<span id="alertthumbnail" class="errorMessages"></span>
<span id="alertthumbnail" class="errorMessages"></span>
</dd>

What shows up on the screen will be the part after a > at path="<null"> closes the input prematurely, and I don't think the hidden input field would save the file input field properly.

,map={fileAsset=C:\...jpg, host=3aeb786b-c009-4108-85e1-1b64540af7fa, sortOrder=0, stInode=33888b6f-7a8e-4069-b1b6-5c1aa9d0a48d, showOnMenu=false, lastReview=null, ...jpg=...jpg, languageId=1, disabledWYSIWYG=[], folder=12b3255d-3368-4580-80bd-047dcc5cb87e, reviewInternal=null, nextReview=null, modDate=2013-05-09 11:02:04.0, owner=dotcms.org.1, modUser=dotcms.org.1, inode=56b98b63-7772-48ff-88a9-0c8e89371b75, identifier=d723cdb5-3e0c-490d-be48-42c603ac91f7},lowIndexPriority=false]"&gt;

Related forum posts 1 & 2

@ghost ghost assigned ravit Jul 12, 2013
@ravit ravit closed this as completed in e8a0f81 Jul 17, 2013
jtesser pushed a commit that referenced this issue Jul 17, 2013
…tShowFields-behavior

fixes #2992 submitContentEdit dontShowFields behavior
@jtesser
Copy link
Contributor

jtesser commented Jul 17, 2013

merged to master and master-2.5

@bryanboza
Copy link
Member

Fixed, tested on master 2.5

ravit added a commit that referenced this issue Sep 10, 2014
Former-commit-id: 0b6ff2452ef67d069b048a3a22491d602c3e40f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants