Close

Bugs

hristian.dimov
4 years ago
#9007 Quote
Avatar
  • Moderator
  • 386
IvanSlater wrote:
Im getting this error:

System.NullReferenceException: Object reference not set to an instance of an object. at SevenSpikes.Nop.Plugins.NopQuickTabs.AdminTabStripConsumer.AdminTabStripConsumer.HandleEvent(AdminTabStripCreated tabEventInfo) at Nop.Services.Events.EventPublisher.PublishToConsumer[T](IConsumer`1 x, T eventMessage)

When editing products.

Can you help?


Hi IvanSlater,

Could you please specify what is your nopCommerce version. Also, please make sure that there are no such calls like this "AdminTabStripCreated(this.Html, null)" in your code. 

Thanks.
Regards,
Hristian Dimov
Nop-Templates.com
IvanSlater
4 years ago
#9010 Quote
Avatar
  • 89
Hi.

Im using nop 3.3 and I didnt find any AdminTabStripCreated(this.Html, null). All AdminTabStripCreated found have both parameters.
hristian.dimov
4 years ago
#9011 Quote
Avatar
  • Moderator
  • 386
IvanSlater wrote:
Hi.

Im using nop 3.3 and I didnt find any AdminTabStripCreated(this.Html, null). All AdminTabStripCreated found have both parameters.


Hi,

when this error started to appear ? Did you install some new plugins recently? I guess some other plugin is causing this ( probably it does not pass the second parameter ).
Regards,
Hristian Dimov
Nop-Templates.com
IvanSlater
4 years ago
#9013 Quote
Avatar
  • 89
Can you show me how are you getting the product id in your tab? Like this?

System.Web.HttpContext.Current.Request.RequestContext.RouteData.Values["Id"]

Thanks!
hristian.dimov
4 years ago
#9014 Quote
Avatar
  • Moderator
  • 386
IvanSlater wrote:
Can you show me how are you getting the product id in your tab? Like this?

System.Web.HttpContext.Current.Request.RequestContext.RouteData.Values["Id"]

Thanks!


Hi,

Yes, this is the way that we get the product id, because the RequestContext is the only place where the product id is present.

object objectId = HttpContext.Current.Request.RequestContext.RouteData.Values["id"];
Regards,
Hristian Dimov
Nop-Templates.com
joster
3 years ago
#10319 Quote
Avatar
  • 127
Hello-

We use nopcommerce 3.40 with the Alfresco theme.
I am trying to add the "hotjar" tracking script to my site, but no matter where I add the script, it causes the quicktabs to stop functioning normally. The tab items still appear, but as a normal list, as if the quicktabs styling is disregarded whenever the hotjar script is executed on same page.

This is th hotjar tracking script:
<!-- Hotjar Tracking Code for www.myfootshop.com -->
<script>
    (function(h,o,t,j,a,r){
        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
        h._hjSettings={hjid:123456,hjsv:5};
        a=o.getElementsByTagName('head')[0];
        r=o.createElement('script');r.async=1;
        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
        a.appendChild(r);
    })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
</script>


I tried adding it directly inside the head in Root.Head.cshtml and also tried adding it to the /scripts/public.common.js

...same result on both.

Any idea how I can work around this issue?

Thanks!
iliyan.tanev
3 years ago
#10322 Quote
Avatar
  • Moderator
  • 347
Hi,

Can you check your browser console for any JavaScript errors ? 

Can you elaborate more on what you mean by "it causes the quicktabs to stop functioning normally" ?

Thanks!
Regards,
Iliyan Tanev
Nop-Templates Dev Team
joster
3 years ago
#10330 Quote
Avatar
  • 127
Yes, Javascript console has this error:
Uncaught TypeError: $.isMobile is not a function

It refers to this section of code:
function OpenWindow(n,t,i,r){var u=(screen.width-t)/2,f=(screen.height-i)/2,e;winprops="resizable=0, height="+i+",width="+t+",top="+f+",left="+u+"w";r&&(winprops+=",scrollbars=1");e=window.open(n,"_blank",winprops)}function setLocation(n){window.location.href=n}function displayAjaxLoading(n){n?$(".ajax-loading-block-window").show():$(".ajax-loading-block-window").hide("slow")}


What I mean by not displaying correctly is just what I said...the tabs appear on the page as just an HTML list..as if the styling is disregarded.

Thanks!
iliyan.tanev
3 years ago
#10332 Quote
Avatar
  • Moderator
  • 347
Hi,

We have questions about this problem before. See more information about the issue at nopCommerce forum and in our forum

Can you make sure that you are running the latest version of the plugin ? 
Also, do you have any custom modification or added JavaScript files ? 
Regards,
Iliyan Tanev
Nop-Templates Dev Team
joster
3 years ago
#10353 Quote
Avatar
  • 127
iliyan.tanev wrote:
Hi,

Can you make sure that you are running the latest version of the plugin ? 
Also, do you have any custom modification or added JavaScript files ? 


Below are the versions I have installed. I am not sure if they are the latest possible:

SevenSpikes.Nop.Core, Version=3.4.1159.17132, Culture=neutral, PublicKeyToken=null

SevenSpikes.Nop.Plugins.Core, Version=3.4.1159.17132, Culture=neutral, PublicKeyToken=null

SevenSpikes.Nop.Plugins.NopQuickTabs, Version=3.4.374.12766, Culture=neutral, PublicKeyToken=null 

I have some additional javascripts executing in the footer of my pages..things like Google +1, Facebook, Bing, and Google tracking, Google Trusted stores..