Close

Backend error doesn't work at all

tmebrands
8 years ago
#11935 Quote
Avatar
  • 10
Getting the following error on the backend, the ajax cart isn't working at all.

/nopajaxcart/getajaxcartbuttonsajax


Short message:  Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@".
The details for the log entry.Full message:  System.Web.HttpParseException (0x80004005): Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@". at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode() at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncCont
Boyko
8 years ago
#11936 Quote
Avatar
  • 1570
gavinramm wrote:
Getting the following error on the backend, the ajax cart isn't working at all.

/nopajaxcart/getajaxcartbuttonsajax


Short message:  Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@".
The details for the log entry.Full message:  System.Web.HttpParseException (0x80004005):


Hi gavinramm,

By looking at the error it looks like the Razor view for the Ajax Cart buttons can't be parsed.
The only reason this could happen is if you have modified the AddProductToCartAjaxButton.cshtml file and now it can't be compiled. Please revert any changes you have made to this file and you will no longer have these errors.
Regards,
Nop-Templates.com Team
tmebrands
8 years ago
#11944 Quote
Avatar
  • 10
I hadn't made any changes, To be sure I disabled/uninstalled the plugin. Removed the older version and re-uploaded the original. Still getting the same error.
Boyko
8 years ago
#11946 Quote
Avatar
  • 1570
gavinramm wrote:
I hadn't made any changes, To be sure I disabled/uninstalled the plugin. Removed the older version and re-uploaded the original. Still getting the same error.


Hi gavinramm,

So this plugin has never worked for you before or it just happened recently?
Anyway please submit a ticket providing a link to your store and maybe FTP access so that we can investigate what might be wrong with this view on your store.
Regards,
Nop-Templates.com Team
tmebrands
8 years ago
#11949 Quote
Avatar
  • 10
Testing done.
NEW NopCommerce 3.5 Instance (downloaded today)
NEW Urban Theme for 3.5 (Downloaded today)

Setup new shop and enabled SevenSpike Core , Urban theme and AjaxCart.

Test 1 : Default theme
Add Product to cart fine using normal cart.

Test 2 : Default theme + Ajax Cart Enabled.
Product added via the ajax cart popup.

Test 3 : Urban theme + Ajax Cart Enabled
Product added via DEFAULT POPUP, ajax cart popup not used and the error is generated in the log.
Boyko
8 years ago
#11950 Quote
Avatar
  • 1570
gavinramm wrote:
Testing done.
NEW NopCommerce 3.5 Instance (downloaded today)
NEW Urban Theme for 3.5 (Downloaded today)

Setup new shop and enabled SevenSpike Core , Urban theme and AjaxCart.

Test 1 : Default theme
Add Product to cart fine using normal cart.

Test 2 : Default theme + Ajax Cart Enabled.
Product added via the ajax cart popup.

Test 3 : Urban theme + Ajax Cart Enabled
Product added via DEFAULT POPUP, ajax cart popup not used and the error is generated in the log.


Hi gavinramm,

We will check this on our end. Did you install the Urban theme AFTER the Ajax Cart plugin?
I am asking as it seems like a setting issue. Anyway we will test and let you know if the problem is in the files in the package or it is something else.
Regards,
Nop-Templates.com Team
hristian.dimov
8 years ago
#11955 Quote
Avatar
  • Moderator
  • 386
gavinramm wrote:
Testing done.
NEW NopCommerce 3.5 Instance (downloaded today)
NEW Urban Theme for 3.5 (Downloaded today)

Setup new shop and enabled SevenSpike Core , Urban theme and AjaxCart.

Test 1 : Default theme
Add Product to cart fine using normal cart.

Test 2 : Default theme + Ajax Cart Enabled.
Product added via the ajax cart popup.

Test 3 : Urban theme + Ajax Cart Enabled
Product added via DEFAULT POPUP, ajax cart popup not used and the error is generated in the log.


Hi,

Thank you for reporting this.

We fixed the problem and the theme is ready for download.

Please download and update the theme to the latest version following this article:
https://www.nop-templates.com/how-to-update-a-nopcommerce-theme

Hope this helps!
Regards,
Hristian Dimov
Nop-Templates.com