Try our conversational search powered by Generative AI!

Form Element Block templates not being applied across severs

Vote:
 

We have several servers in our internet (external) and one in our intranet (internal). I have taken most of the Form Element Blocks and converted them to cshtml and added bootstrap styling. All works good in my single server test domain and my intranet (single server) but the Element Block templates are not applied to our external domains. The external and internal domains use the same instance of EPiServer.

I'm using the same Form but placed on two different pages. One internal and one external. How do I get the external domains to apply the Element Block templates? They reside in folder /Shared/ElementBlocks.

#246748
Jan 13, 2021 17:57
Vote:
 

Does anyone have any suggestions? I'm at a lose as to why the element templates I've converted only work in our intranet and not internet.

#248409
Feb 09, 2021 20:02
Vote:
 

Hi Eric - sorry, I'm trying to understand "The external and internal domains use the same instance of EPiServer."

I assume you have a test/staging website that is available internally and Form Element templates works fine on this website

You have another website (probably production) with separate Episerver instance and Forms element templates do not work on this website.  - That seems like a deployment issue

If both websites are running on the same instance and you have restricted one website to work for internal users only (probably through Access rights in Episerver) then you need  to check

if the website has configured to Use site-specific assets (ref: http://webhelp.episerver.com/latest/en/cms-admin/managing-websites.htm)

Content types are not restricted in code  (ref: https://world.episerver.com/documentation/developer-guides/CMS/Content/Attributes/ & https://world.episerver.com/documentation/developer-guides/CMS/Content/Properties/built-in-property-types/Restricting-content-types-in-properties/ )

I hope that helps

#248448
Feb 10, 2021 15:00
Vote:
 

When I look within episerver "Manage WebSites" on the Config tab, I only see my non-prod domain and do not see my prodiction domain. Does that make a difference?

This does work in two different non-prod domains. We have two different area built of of the episerver Root tree. One is our Internet and the other is our Intranet. In each of our non-prod domains, epi Forms work as expected. In our prod domain, epi Forms is not using the custome Element Block view I have converted to HTLM5/Bootstrap. I have a single epi Form built. I have placed it on a Internet page and the same form on a Intranet page.

Root

 -- Internet -> does not work in prod

-- Internet -> does work in prod

#248449
Edited, Feb 10, 2021 15:18
Vote:
 

I'm also trying to understand the issue. To me it sounds like you are (or at least should be) working with two different environments (non-production and production). You should have your non-production server, where the websites are setup to use your non-production domains, then you should have your production server, where the websites are setup to use your production domains.

If I'm reading this correctly, everything is working fine on the non-production server, but it is not working correctly on production. If so, then as Naveed said, it sounds like you have a deployment issue.

On the other hand, if one form in production is working, and the other isn't, that really doesn't make much sense, because both forms use the same elements (as long as they are on the same codebase). Are you sure it's not a site-based styling issue? Maybe the same element block templates are used but the specific site applies it's own styles which make the forms not look the same?

You might want to provide some screenshots to show us what you are seeing.

#248450
Feb 10, 2021 16:14
Vote:
 

This is working in our production domain, but only on our internal Intranet. It does no work on our public facing Internet url, www.mymlc.com, where our Internet domain is a different url and does work.

I can tell that on the public facing url, the styles are the default ascx views.

Would it matter that we have EPiServer in a different project then our site and epi is trying to look in it's project for my views?

I have this in the config so it should be using the template I converted.

<episerverforms minimumAccessRightLevelToReadFormData="Edit"
                    sendMessageInHTMLFormat="true"
                    coreController="/EPiServer.Forms/DataSubmit"
                    formElementViewsFolder="~/Views/Shared/ElementBlocks"
                    workInNonJSMode="false"
                    injectFormOwnJQuery="true"
                    injectFormOwnStylesheet="true"
                    visitorSubmitTimeout="90"
                    renderingFormUsingDivElement ="false"
                    serializingObjectUsingNameValueFormat ="true">

#248451
Edited, Feb 10, 2021 16:19
Vote:
 

"Would it matter that we have EPiServer in a different project then our site and epi is trying to look in it's project for my views?"

Ok. This is confusing. Are you saying you have two Episerver projects (web roots) in the same solution? Or you have one web root, but the views are in a different project than the web root?

None the less, if you are using the same codebase on production, and the same form is used on both sites, then it should be using the same views.

#248452
Feb 10, 2021 17:11
Vote:
 

We have split the epi side into it's own project. I just tried a test by coping the views to this project and see if these views got triggered. They did not get triggered views so please ignore that.

#248453
Feb 10, 2021 17:19
Vote:
 

Well. I'm not sure where to go from here, aside asking for more screenshots of what you're seeing and digging more into your setup. Everything sounds like it should be working fine, but maybe we're missing something in communication.

#248457
Feb 10, 2021 18:36
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.