Hi,
I have used multi site with single installation using two content root folder and having different domain/hostname in different folder. So i can access both sites with different template using different url. This is working fine.
Now, I have form where user can fill(on both site). when user submits it saved successfully from both site and a confirmation link is sent to user(works on both site). I am using controller to do accept the form.
And confirmation link is sent to email, now when user clicks on link this needs to be handled by another controller, Now the culprit shows here, when I do it using one domain(url) then it executes successfully but when using another url it doesn't go to the action required. Surprisingly the controller constructor is called and also the overrided index method is also called but another method is not executed.
my surfaceController is as:
public class SampleResultContentController : RenderMvcController
{
private static readonly ILog Logger =
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType
);
public SampleResultContentController()
: base()
{
Logger.Info("initializing the constructor");
}
public override ActionResult Index(Umbraco.Web.Models.RenderModel model)
{
Logger.Info("overriding the base index");
return base.CurrentTemplate(model);
}
public ActionResult SampleConfirmation(RenderModel model)
{
Logger.Info("Executing the sample confirmation index");
}
}
the url is "{{domain}}/sample/confirm?token=EDIE3483T7ED23"
I have document called, "SampleConfirmation" and respective two templates called, "SampleConfirmation" and "SampleConfirmationNp" where former is for normal domain (.com) and later is for (.com.np).
And I have two root folder/content in content as Home and homeNP, they both have child documents as sample-> Confirm . where confirm is of type "SampleConfirmation" document and two template respectively.
When should it get hit?
so I when I hit abc.com/sample/confirm then the "sampleConfirmation" action is called but when i hit abc.com.np then action is not reached.
Hi I am noticing that Index method in my surface controller not hit, but i am using macro instead of template (because i have lots of forms to add )
I call my macro using renderpartial which is not working.
but after load a view form it does hit submit button
Action of surfaceController not hitting
Hi, I have used multi site with single installation using two content root folder and having different domain/hostname in different folder. So i can access both sites with different template using different url. This is working fine.
Now, I have form where user can fill(on both site). when user submits it saved successfully from both site and a confirmation link is sent to user(works on both site). I am using controller to do accept the form.
And confirmation link is sent to email, now when user clicks on link this needs to be handled by another controller, Now the culprit shows here, when I do it using one domain(url) then it executes successfully but when using another url it doesn't go to the action required. Surprisingly the controller constructor is called and also the overrided index method is also called but another method is not executed.
my surfaceController is as:
the url is "{{domain}}/sample/confirm?token=EDIE3483T7ED23"
Any help please.
Where are you calling the controller from? When should it get hit? :) Charlie.
Where are you calling the controller from?
I have document called, "SampleConfirmation" and respective two templates called, "SampleConfirmation" and "SampleConfirmationNp" where former is for normal domain (.com) and later is for (.com.np). And I have two root folder/content in content as Home and homeNP, they both have child documents as sample-> Confirm . where confirm is of type "SampleConfirmation" document and two template respectively.
When should it get hit?
so I when I hit abc.com/sample/confirm then the "sampleConfirmation" action is called but when i hit abc.com.np then action is not reached.
hope this clarifies bit.
Ok that makes sense you are hijacking the templates :). So do you have two templates SampleConfirmation and SampleConfirmationNp?
Try creating an action result called SampleConfirmationNp and see if that hits? It should do
thanks Charlie , that works.
much thanks for the term hijacking, it directs me to correct documentation to get to know the detail behind the scene.
Hi I am noticing that Index method in my surface controller not hit, but i am using macro instead of template (because i have lots of forms to add ) I call my macro using renderpartial which is not working.
but after load a view form it does hit submit button
see my post here
is working on a reply...