News:

Looking for documentation? Take a look on our wiki

Main Menu

Remove (comment) the code in VM that writes the error

Started by goudmahendra, December 23, 2020, 12:29:39 PM

Previous topic - Next topic

goudmahendra

Virtuemart is been modified to show the products images from and  external server, so system recieve a lot of errors from the thumbnails  not created or images not found, etc.... All theese errors go to the log  file. I have blocked the writing of this file with permissions to avoid  the enormus size (some Gb within few weeks), but I'm sure the the  server CPU is under stress and it slow all server.  Question : is it possibile to remove (comment) the code in VM that writes the error in /log/com_virtuemart.log.php ?

joomla 3.9.23

VirtueMart 3.6.10 10211

Please help

Thanks

GJC Web Design

possibly  administrator\components\com_virtuemart\helpers\img2thumb.php

NewImgCreate()
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

goudmahendra

Hi GJC Web Design,

I have commented out the line but not solve my problems
Error file /log/com_virtuemart.log.php is growing now after commented out line.

Thanks

Jörgen

What have You commented out ?
Any surrounding code that submits data to the log ?
What error are we taking about ?
Php errors and PHP error log ?
VM errors and VM error log ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

goudmahendra

Hello Jörgen,

What have You commented out ?

I have comment out this line: vmError(vmText::sprintf('COM_VIRTUEMART_FILE_NOT_FOUND',$filename));
File path: administrator\components\com_virtuemart\helpers\img2thumb.php

Any surrounding code that submits data to the log ?

Yes i need to comment code which is submit data in error log file because my error log file size increasing.
today I have deleted the file /log/com_virtuemart.log.php but it's growing anyway...

What error are we taking about ?
Php errors and PHP error log ?
VM errors and VM error log ?

About VM error log

Any help..

Thanks

Jörgen

Why do you have error reporting in VM turned on ?

Turn it off in VM configuration maybe?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

goudmahendra

Hello Jörgen,

Enable VirtueMart 404 error handling is uncheckd allready.

Thanks

Studio 42

Quote from: goudmahendra on December 28, 2020, 10:49:15 AM
Hello Jörgen,

Enable VirtueMart 404 error handling is uncheckd allready.

Thanks
This have nothing to do with internal errors, only bad shop links.
Go in back-end in the virtuemart > configuration and disable all messages/ debug tools (in  first tab)

goudmahendra

Hello,

I have been disabled all messages and debugs option allready.
You can see screenshot here: https://drive.google.com/file/d/1WhPqgzgBFnXafUzP1psKZbAt-U00JZA-/view

Thansk

Jörgen

If you really have messages in VM error log not PHP error log this should go away with VM debug turned off. Is joomla debug reporting turned on ?

What are the messages ?

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

I think you're thinking wrong.

You are now dealing with the "consequences" of your actions - editing the code to generate thumbnails == error messages written to the log - these errors will still occur even if you turn off writing to the log == the server will be constantly overloaded.

The right solution is to eliminate the "cause" - a bad modification of the program code.

Please correct your mistake and no messages will be generated.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

goudmahendra

Hello Jörgen,

Joomla error reporting is also none.

The messages is store in file is:
2020-12-27 09:09:04 ERROR vmError: File /var/www/vhosts/farmaciapinzerato.it/shop.farmaciapinzerato.it//var/www/vhosts/farmaciapinzerato.it/shop.farmaciapinzerato.it/immagini/013437.jpg non trovato

Thanks

Jörgen

I agree with Rudolf
The cause of the error is better to correct.

I checked my virtuemart.log and found some error messages conecrning not found images. But I have only a few so there was a maybe a hundred lines in  the file. Make sure you have all the images or use a tool like agent ransack to find the VMerror instance that is still sending out these messages.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Quote from: goudmahendra on December 23, 2020, 12:29:39 PM
Virtuemart is been modified to show the products images from and  external server, so system recieve a lot of errors from the thumbnails  not created or images not found, etc....

joomla 3.9.23

VirtueMart 3.6.10 10211

What do you mean with "Virtuemart is been modified". Yes I wrote that. Or do you mean a special modification for you? And why does this function creates errors? this is what I would ask first. Btw, I wrote that before reading the last two posts.

Please update VirtueMart and use our code. VM can handle remote files itself now. Just use enter the path without protocoll, just with //
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/