Surendra Sharma

Surendra Sharma

Search This Blog

Wednesday, October 4, 2017

Presentation Rendering Reporter: New module on Sitecore Marketplace

I was checking my daily mail and received mail from Sitecore Marketplace Team that my new module is approved and published at Marketplace.

This is my third module on Sitecore marketplace where I spend almost 14 hours on this new module which I named as “Presentation Rendering Reporter”.

This module is used for analysis, comparing and reporting purpose for getting item’s presentation rendering details.

It allows you to enter GUID of an item and give option of displaying its children rendering details. You can limit the number of children to be displayed on screen as

UI Option in Presentation Rendering Reporter
UI Option in Presentation Rendering Reporter


It will display items rendering details in two column
1.    Shared Layout details

2.    Item’s final layout presentation rendering details in all languages in all versions in single cell. This is a very smart way to present details in combination of horizontal and vertical tabs. Just select any language tab, a related version tab and you will get its rendering details which include

* Rendering Name
* Placeholder
* Datasource path
* Item Path at bottom

Single view of rendering details is the unique feature of this module.


Shared and Final Rendering details
Shared and Final Rendering details

You can download this module from Sitecore Marketplace at https://marketplace.sitecore.net/Modules/P/Presentation_Rendering_Reporter.aspx

Installed this Sitecore module and access it as http://<sitecoreinstancename>/PresentationRenderingReporter.aspx

I have uploaded its code at Github, which you are free to modify at, https://github.com/alexksharma/Presentation-Rendering-Reporter

I hope you like this Sitecore module. Stay tuned for more Sitecore related details.

Till that happy Sitecoring :)
 
Please leave your comments or share this module if it’s useful for you. Waiting for your feedback.

Thursday, September 21, 2017

Fixing Sitecore PowerShell post installation issues

I was trying to install Sitecore PowerShell on my Sitecore 8.2 instance by downloading “Full 4.6 release for Sitecore 8”. After successful installation, when I started PowerShell console, I hit with error

"Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

As my laptop running on Windows 7 (Yes, it’s still on WIN 7) on 64-bit processor, so I fixed this by downloading and installing "Windows Management Framework 4.0" having setup file name "Windows6.1-KB2819745-x64-MultiPkg.msu" from https://www.microsoft.com/en-us/download/details.aspx?id=40855

Note - You must need to restart your machine after this setup.

After restarting machine, login to Sitecore instance and open PowerShell Console. It was started but received pop up note that "Elevated session state is required to run the script." and Sitecore asking for current Sitecore logged-in user password. This pop up will raise when you open any PowerShell window with every Sitecore login time.

To fix this 

Open "include\Cognifide.PowerShell.config" file and make entry as "allow" in below keys

<token name="Default" expiration="00:00:00" elevationAction="Allow"/>
<token name="Console" expiration="00:05:00" elevationAction="Allow"/>
<token name="ISE" expiration="00:05:00" elevationAction="Allow"/>
<token name="ItemSave" expiration="00:05:00" elevationAction="Allow"/>    

Please note, this configuration changes are only for local development environment. Don’t make it on Production environment.

After this my PowerShell started working fine on my new Sitecore 8.2 instance.

Please leave your comments or share this trick if it’s useful for you.

References

Sunday, September 3, 2017

Another way to render WFFM Form



WFFM is a nice module to capture details from visitors. But when developers try to render WFFM forms in web page, then she has to face CSS and JS conflict with webpage. However this is good for testers and QA team as they will able to find lots of cosmetic issues ;)

Most of the time, WFFM’s CSS and JS stop or change the UI and functionality of the web page.
However there is an alternative way to render WFFM form – Iframe.

Follow below steps use it
* Create WFFM form
* Create item having separate page layout and MVC rendering for WFFM form only.
* Create one parameter rendering IFrame with three field - IFrame Url, Width and Height as shown below

WFFM form via IFRAME
WFFM form via IFRAME


Specify relative path of above item page rendering path in IFrame URL field

Specify below line in Iframe.cshtml as 

<iframe src="@Model.Url" width="@Model.Width" height="@Model.Height" scrolling="auto" frameborder="0" align="left" name=""></iframe>


When you render web page, your WFFM form will be rendered in IFRAME and all WFFM form CSS and JS are also load into IFRAME. In this way we separated CSS and JS of web page with WFFM form CSS and JS. So they will never conflict.

However there are two issues that I encountered with this approach

* If your website is running on HTTPS and you have entered the WFFM item path as HTTP then you will face issue. To fix it, instead of using full URL, you must use relative path.

* How to handle multi lingual WFFM forms? Let’s suppose your page is in French and now if you try to render your WFFM form with relative path then it try to render by default in English language. To fix it specify your relative path with language query string as "/wffm-forms/contact-form?sc_lang=fr-fr"

That’s it. 

I hope you will try this alternative approach. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)

Please leave your comments or share this trick if it’s useful for you.