Adwords Plugin error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
When trying to view the config page of the Adwords tracking plugin (developed for 2.5) using nop2.6 I get the following error

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

Can anyone suggest changes that will fix this so we can publish this plugin for 2.6

Darren
11 anos atrás
FIX

This fix applies to most pre-2.6 widgets as far as I can tell.

\Plugins\Nop.Plugin.Widgets.GoogleAnalytics\Controllers\WidgetsGoogleAnalyticsController.cs

Replace both "Configure" methods with

  [AdminAuthorize]
        [ChildActionOnly]
        public ActionResult Configure()
        {
            var model = new ConfigurationModel();
            model.GoogleId = _googleAnalyticsSettings.GoogleId;
            model.TrackingScript = _googleAnalyticsSettings.TrackingScript;
            model.EcommerceScript = _googleAnalyticsSettings.EcommerceScript;
            model.EcommerceDetailScript = _googleAnalyticsSettings.EcommerceDetailScript;

            model.ZoneId = _googleAnalyticsSettings.WidgetZone;
            model.AvailableZones.Add(new SelectListItem() { Text = "<head> HTML tag", Value = "head_html_tag"});
            model.AvailableZones.Add(new SelectListItem() { Text = "Before <body> end HTML tag", Value = "body_end_html_tag_before" });
            
            return View("Nop.Plugin.Widgets.GoogleAnalytics.Views.WidgetsGoogleAnalytics.Configure", model);
        }

        [HttpPost]
        [AdminAuthorize]
        [ChildActionOnly]
        public ActionResult Configure(ConfigurationModel model)
        {
            if (!ModelState.IsValid)
                return Configure();

            //save settings
            _googleAnalyticsSettings.GoogleId = model.GoogleId;
            _googleAnalyticsSettings.TrackingScript = model.TrackingScript;
            _googleAnalyticsSettings.EcommerceScript = model.EcommerceScript;
            _googleAnalyticsSettings.EcommerceDetailScript = model.EcommerceDetailScript;
            _googleAnalyticsSettings.WidgetZone = model.ZoneId;
            _settingService.SaveSetting(_googleAnalyticsSettings);

            return Configure();
        }



widgitId's have been removed as parameters
11 anos atrás
 public ActionResult PublicInfo(int widgetId)


should be changed to

public ActionResult PublicInfo(string widgetZone)


also

Darren
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.