SharePoint 2010 - RichImageField not displaying in display mode - sharepoint

I am currently doing some research into SharePoint Page Layouts and building pages based on those layouts.
I currently have a page layout containing several RichImageFields and RichHtmlFields, but it seems that the first RichImageField is not displaying (doesn't even render out anything).
As far as I can see, he's the same as the others:
<div id="headerImage">
<PublishingWebControls:RichImageField id="HeaderImage" FieldName="HeaderImage1" runat="server"/>
</div>
<div id="middleContent">
<div id="left">
<div id="about">
<fieldset>
<legend>About</legend>
<PublishingWebControls:RichHtmlField ID="About" FieldName="AboutMedicInfo1" runat="server"/>
</fieldset>
</div>
<div id="items">
<h1>
<SharePointWebControls:FieldValue FieldName="ItemsTitle1" runat="server"/></h1>
<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
<SharePointWebControls:TextField runat="server" FieldName="ItemsTitle1" />
</PublishingWebControls:EditModePanel>
<div id="Item1">
<fieldset>
<legend>
<SharePointWebControls:FieldValue FieldName="Item11" runat="server"/></legend>
<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
<SharePointWebControls:TextField runat="server" FieldName="Item11" />
</PublishingWebControls:EditModePanel>
<PublishingWebControls:RichHtmlField ID="Item1" FieldName="Item1Content1" runat="server"/>
</fieldset>
</div>
<div id="Item2">
<fieldset>
<legend>
<SharePointWebControls:FieldValue FieldName="Item21" runat="server"/></legend>
<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
<SharePointWebControls:TextField runat="server" FieldName="Item21" />
</PublishingWebControls:EditModePanel>
<PublishingWebControls:RichHtmlField ID="Item2" FieldName="Item2Content1" runat="server"/>
</fieldset>
</div>
</div>
</div>
<div id="center">
<div>
<PublishingWebControls:RichImageField id="HighLight1" FieldName="HighLight11" runat="server"/></div>
<div>
<PublishingWebControls:RichImageField id="HighLight2" FieldName="HighLight22" runat="server"/></div>
<div>
<PublishingWebControls:RichImageField id="HighLight3" FieldName="HighLight32" runat="server"/></div>
</div>
<div id="right">
<div id="report">
<PublishingWebControls:RichHtmlField ID="Report" FieldName="Report" runat="server"/>
</div>
<div id="webparts">
<WebPartPages:WebPartZone runat="server" Title="Rechtsonder" ID="BottomRightControl"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone></div>
</div>
</div>
</div>
The funny thing is that I'm perfectly able to see the image when I'm in editing mode and when I'm viewing the Page Library items (after I added the specified field to the view).
Does anyone have any experience with this? Feel free to ask further questions if I might be unclear.

Okay, I should have checked before posting my initial question. It turned out that my problem was because I was using the Page content type, instead of the Article Page or Welcome Page content types. The Page CT doesn't have the field that the image was looking for.
What I find really interesting is that it still let me select the image AND it stored the value somewhere... even though there was no official field for it. I suspect that the field in the library is there, since you would need it for your other content types.
Anyway, hoping that someone else may find this useful.

Make sure that you don't miss the two properties RichText="TRUE" and RichTextMode="FullHtml" of the image field definition to be like:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field
ID="{4ea31e74-f59d-4ddf-863c-607a01735f65}"
Name="pls_H2_2_Image"
DisplayName="Titel 2 Bild"
Type="Image"
Required="FALSE"
RichText="TRUE"
RichTextMode="FullHtml"
Group="Custom">
</Field>
</Elements>
I faced this issue before and this solution did it properly.

Related

CMSParagraphComponent does not render HTML tag attributes after 2105 Upgrade

After upgrading to SAP Commerce 2105 Patch 13 from 1811, components with type CMSParagraphComponent do not have img, span HTML tags and HTML tag attributes like class, style.
Before upgrade HTML was displaying in the page as following:
<div class="content">
<div class="size-guide__area active" data-js="size-guide-area">
<div>
<div class="size-guide__close" data-js="size-guide-close">
My text
<span class="icon-close-circle"></span>
</div>
</div>
</div>
</div>
My component is covered with <true class="yCmsComponent"></true> after upgrade somehow.
After upgrade HTML is displaying as following:
<true class="yCmsComponent">
<div class="content">
<div>
<div>
<div>
My Text
</div>
</div>
</div>
</div>
</true>
impex:
INSERT_UPDATE CMSParagraphComponent;$contentCV[unique=true];uid[unique=true];name;&componentRef;content[lang=$lang];
;;chartParagraph;Chart Paragraph;chartParagraph;"<div class='size-guide__area' data-js='size-guide-area'>
<div>
<div class='size-guide__close' data-js='size-guide-close'>
My text
<span class='icon-close-circle'></span>
</div>
usage in tag file:
<cms:component uid="chartParagraph" evaluateRestriction="false"/>
CMSParagraphComponentRenderer class is sanitizing HTML. Rules are defined in HtmlSanitizerPolicyProvider class. It is checking a property before sanitizing. I solved issue by changing the property in storefront extension. You may customize HtmlSanitizerPolicyProvider class to have a safer solution. Changing following property may cause an issue, it is not the safest solution.
In the project.properties file of the storefront extension, add following property.
cms.components.allowUnsafeJavaScript=true

Professionally style a stripe elements credit card input form using stripe elements CSS?

I am in need of any standard way of making the Stripe credit card input form from the Stripe docs look professional. Here is what it looks like with nothing done to it:
Stripe docs talk extensively about 'Stripe Elements' - a set of CSS that allows for easy styling - the problem is I have no idea how to apply it to this form.
Stripe give an example, but it doesn't work, and their IRC currently is down
Here is the code for the form, which is straight from the Stripe docs (functionally, it works great, it just looks drab):
<form id="payment-form">
<div id="card-element">
<!-- Elements will create input elements here -->
</div>
<!-- We'll put the error messages in this element -->
<div id="card-errors" role="alert"></div>
<br>
<button id="submit">Pay</button>
</form>
I would like it to look like the one in the docs (note that mine doesn't have an email field, but is otherwise very similar):
I got it looking half respectable through trial and error of the different classes found in the stripe example, some bootstrap classes, and form border from here. I'm sure there are (much) better looking forms, but here's what this results in:
<div class="col-lg-4">
</div>
<div class="col-lg-4">
<form id="payment-form">
<label for="card-element">Credit or debit card:</label><br>
<div id="card-element" class="form-control" style='height: 2.4em; padding-top: .7em;'>
<!-- Elements will create input elements here -->
</div>
<!-- We'll put the error messages in this element -->
<div id="card-errors" role="alert"></div>
<br>
<button id="submit" class="btn btn-lg btn-primary btn-block">Pay</button>
</form>
</div>
<div class="col-lg-4">
</div>

Search bar making my web page not trustable

I have a search bar on my website that goes to google but it is making that web page not trustable. I have ssl and all my other pages have the little lock but the page with the search has an i with a circle around it. If i take the search off the page the little lock comes back. Can someone maybe tell me why.
<div class="wrap">
<div class="search">
<form method="get" action="http://www.google.com/search">
<input type="text" name="q" class="searchTerm" placeholder="Search The Web"autocomplete="off" >
<button type="submit" class="searchButton">
<i class="fa fa-search"></i>
</button>
</form>
</div>
</div>

Add form to branded share point site (office 365)

How do I add a form (like below) in SharePoint (Office 365). I am posting from site.com to another_site.com. It is a branded site and I want the form in the master page.
I currently get this error: Your master page has one or more HTML tags. For your master page to work, remove the tags (but you can leave the content in them).
<form action="http://another_site/test" method="post">
<div class="form-group">
<div class="radio">
<input type="radio" name="request" value="demo">Request
</div>
<input name="fullname" type="text" class="form-control" placeholder="Full Name" required="required">
</div>
<button type="submit" class="btn">Submit</button>
</div>
</form>
If you would use a content editor webpart to incorporate the form, would that work? You then can embed the webpart into the masterpage.

What to use to create a custom grid layout on Zurb Foundation

I'm new to JS and I'm trying to find a solution to creating a responsive custom grid layout on the Zurb Foundation 4 framework.
Custom Layout
There will be a set size for bigger blocks and the smaller ones will fill in around it but in this type of pattern as more divs are added.
But in a mobile layout, they will all become the same size and stack.
I've been messing around with mason.js and jQuery masonry but I haven't had any luck. Would either of these work for my problem or is there something else I should look into?
You can do a layout like that with just nested rows and using other grid classes like "small-", "large-", push, pull etc
I know you mentioned a JavaScript solution, but I thought I would offer up a crude Html/CSS option.
<div class="row">
<div class="large-2 columns">
<div class="row">
<div class="large-12 columns"></div>
</div>
<div class="row">
<div class="large-12 columns"></div>
</div>
</div>
<div class="large-5 columns"></div>
<div class="large-5 columns"></div>
</div>
<div class="row">
<div class="large-4 columns"></div>
<div class="large-8 columns">
<div class="row">
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
</div>
<div class="row">
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
</div>
</div>
</div>
Here is an extremely rough jsFiddle example
Obviously some playing around with the column count and possibly customize margins would be in-order. I did remove the media queries since the result window was playing tricks on me.
Hope this helps either way.
I wrote a plugin that does just this. check out www.masonjs.com that should do exactly what you're looking for! Cheers!

Resources