Close

Stray closing tags

devtools
9 years ago
#10287 Quote
Avatar
  • 4
I have a problem with the blog overview page.


When a blog post contains lots of small html tags (for example: <div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>) then the blog overview page outputs the following:

<div class="post-body">
            <div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>test</div>
<div>...</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
          </div>.
As you can see there are too many stray closing tags which causes the entire layout to render incorrectly. What could be the cause of this behaviour?  Thank you
iliyan.tanev
9 years ago
#10299 Quote
Avatar
  • 347
Hi,

Thank you for your feedback! 

It was a bug, and it is now fixed, but it is not yet deployed. We will deploy it latter today or tomorrow. I will write back when we do.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
iliyan.tanev
9 years ago
#10305 Quote
Avatar
  • 347
Hi,

Everything is deployed. You should update your plugin.
Regards,
Iliyan Tanev
Nop-Templates Dev Team
devtools
9 years ago
#10306 Quote
Avatar
  • 4
Hi,

Thank you for your fast reply and the new release!

However unfortunately the new version crashes on every page except the admin area. I updated the usual way as described here: http://www.nop-templates.com/how-to-update-a-nopcommerce-plugin. I updated both the core and plugin. I tried rebuilding the application, clearing cache in admin area and restarting the application. I also tried reinstalling the plugin in the admin area. 

The following error is from the homepage:

[code]
Server Error in /.
The stack is empty.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The stack is empty.

Source Error:

Line 44:}
Line 45:
Line 46: var result = Acquire ();
Line 47: if (cache time> 0)
Line 48: cacheManager.Set (key, resulting, cache time);

Source file:  \ Libraries \ Nop.Core \ Caching \ Extensions.cs Rule: 46

Stack Trace:

[InvalidOperationException: The stack is empty.]
   System.Collections.Stack.Pop () +14291888
   SevenSpikes.Nop.Plugins.RichBlog.Helpers.HtmlHelper.GetBlogPostPreview (numberOfCharsToGet Int32, String blog body, List`1 tagsToBeExcluded) +831
   SevenSpikes.Nop.Plugins.RichBlog.Controllers.RichBlogController.olCUdsTQv9 () +582
   Nop.Core.Caching.CacheExtensions.Get (ICacheManager cache manager, String key, Int32 cache time, Func`1 Acquire) in \ Libraries \ Nop.Core \ Caching \ Extensions.cs: 46
   Nop.Core.Caching.CacheExtensions.Get (ICacheManager cache manager, String key, Func`1 Acquire) in \ Libraries \ Nop.Core \ Caching \ Extensions.cs: 25
   SevenSpikes.Nop.Plugins.RichBlog.Controllers.RichBlogController.HomePageBlog () +666
   SevenSpikes.Nop.Plugins.RichBlog.Controllers.RichBlogController.RichBlogForWidgetZone (String widget zone) +71
   lambda_method (Closure, Controller Base, Object []) +139
   System.Web.Mvc.ReflectedActionDescriptor.Execute (Controller Context controller context, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (Controller Context controller context, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate (IAsyncResult asyncResult) +67
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async. <> C__DisplayClass46. <InvokeActionMethodFilterAsynchronouslyRecursive> b__3f () +386
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters (IAsyncResult asyncResult) +42
   System.Web.Mvc.Async. <> C__DisplayClass2b. <BeginInvokeAction> b__1c () +38
   System.Web.Mvc.Async. <> C__DisplayClass21. <BeginInvokeAction> b__
devtools
9 years ago
#10307 Quote
Avatar
  • 4
Hi,

Thank you for your fast reply and the new release! 

However unfortunately the new version crashes on every page except the admin area. I updated the usual way as described here: http://www.nop-templates.com/how-to-update-a-nopcommerce-plugin. I updated both the core and plugin. I tried rebuilding the application, clearing cache in admin area and restarting the application. I also tried reinstalling the plugin in the admin area. 

The following error is from the homepage:
http://pastebin.com/kwhQ027u

And the following error is from the blog overview page
http://pastebin.com/ABDdBwC0

Thank you!
iliyan.tanev
9 years ago
#10312 Quote
Avatar
  • 347
Hi,

Sorry, it should be fixed now. Please update your plugin again.

We are looking forward for your feedback!
Regards,
Iliyan Tanev
Nop-Templates Dev Team
devtools
8 years ago
#10333 Quote
Avatar
  • 4
Hi Iliyan,
thank you very much for the fix. it works!