0

I Installed Sitecore Twitter Feed Integration package from the market place. The module installs a controller called SitecoreTwitterFeed.Web.Controllers.TwitterController, which I'm trying to view its code. The code exits on Sitecore and not my solution.

What I'm really trying to do is avoid this error by pointing the controller field to SitecoreTwitterFeed.Web.Controllers.TwitterController

enter image description here

5
  • Welcome to SSE. You can decompile the assembly that comes with the module using ILspy or DotPeek and look for the controller code. Commented Jun 3, 2021 at 14:27
  • Also, did you try passing the controller with a namespace like SitecoreTwitterFeed.Web.Controllers.TwitterController, <Assembly_Name> Commented Jun 3, 2021 at 14:36
  • Since the Twitter action exists in both SitecoreTwitterFeed.Web and Sitecore.XA.Feature.Social dlls you need to specify the fully qualified namespace in your Controller field Commented Jun 3, 2021 at 14:41
  • I tried passing SitecoreTwitterFeed.Web.Controllers.TwitterController, SitecoreTwitterFeed.Web.dll and it worked!
    – ffomar
    Commented Jun 3, 2021 at 14:56
  • That's great. I'd add this as an answer. Commented Jun 3, 2021 at 15:52

1 Answer 1

0

This issue happens when there is more than one DLL with the same controller name in the application. Then the conflict will arise because the DefaultControllerFactory would not know which controller to create. For example in your case, Twitter action exists in both assemblies:

  • Sitecore.XA.Feature.Social
  • SitecoreTwitterFeed.Web

In order to resolve this issue, you need to pass the fully qualified namespace of the controller along with the assembly name in the controller field of rendering as shown below:

SitecoreTwitterFeed.Web.Controllers.TwitterController, SitecoreTwitterFeed.Web

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.