You have no items in your shopping cart.

Sunday, November 24, 2024 5:01:37 PM

Problem with javascript optimization

Posted: 6 years ago

#8140 Quote

igealasanitaria

Posted: 6 years ago

#8140 Quote
Hello,

I've just enabled javascript optimization, but I noticed that in the log registry there are the following errors:

Error. Optimization(JavaScript). file=c:\inetpub\wwwroot\nop_igealasanitaria\js\public.common.js, minfile=c:\inetpub\wwwroot\nop_igealasanitaria\js\public.common.min.js

System.IO.DirectoryNotFoundException: Impossibile trovare una parte del percorso 'c:\inetpub\wwwroot\nop_igealasanitaria\js\public.common.js'.
   in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   in System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   in System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   in System.IO.StreamReader..ctor(String path)
   in FoxNetSoft.Plugin.Misc.Pagespeed.Services.MinifyOptimizationService.OptimizeJavaScript(String fileName, Encoding encoding, Boolean overwrite, StringBuilder& debug)

-------------------

Error. Optimization(JavaScript). file=c:\inetpub\wwwroot\nop_igealasanitaria\js\public.ajaxcart.js, minfile=c:\inetpub\wwwroot\nop_igealasanitaria\js\public.ajaxcart.min.js

System.IO.DirectoryNotFoundException: Impossibile trovare una parte del percorso 'c:\inetpub\wwwroot\nop_igealasanitaria\js\public.ajaxcart.js'.
   in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   in System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   in System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   in System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   in System.IO.StreamReader..ctor(String path)
   in FoxNetSoft.Plugin.Misc.Pagespeed.Services.MinifyOptimizationService.OptimizeJavaScript(String fileName, Encoding encoding, Boolean overwrite, StringBuilder& debug)

Thanks

Posted: 6 years ago

#8147 Quote

Support

Posted: 6 years ago

#8147 Quote
>System.IO.DirectoryNotFoundException: Impossibile trovare una parte del percorso 'c:\inetpub\wwwroot\nop_igealasanitaria\js\public.common.js'.

I don't know.
Do you see this file on your disk?
c:\inetpub\wwwroot\nop_igealasanitaria\js\public.common.js


Plugin uses parameter 'hostingEnvironment.WebRootPath' for nop 4.00.
We had to have such file path
c:\inetpub\wwwroot\nop_igealasanitaria\wwwroot\js\public.common.js.

Can I connect you your PC and check it with you?

Posted: 6 years ago

#8149 Quote

igealasanitaria

Posted: 6 years ago

#8149 Quote
Hello,

thank you for your reply.

I've already opened a ticket with my programmer.

I'm waiting for a response from him.

I will contact you if he won't be able to resolve the problem.

Thanks

Posted: 6 years ago

#8151 Quote

igealasanitaria

Posted: 6 years ago

#8151 Quote
Hello,

can you tell me where I can find  "hostingEnvironment.WebRootPath" parameter?

This is the correct path for js: siteaddress/wwwroot/js

What should I do if you need to connect to my pc?

Thanks

Posted: 6 years ago

#8153 Quote

Support

Posted: 6 years ago

#8153 Quote
Try to see in class IHostingEnvironment.
NopCommerce uses this for getting path for JS folder too.
(ASP.NET Core uses it too)

Posted: 6 years ago

#8154 Quote

Support

Posted: 6 years ago

#8154 Quote
Open the site root folder and check it .

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved