VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: Nilsy on November 07, 2014, 15:17:18 PM

Title: flexibleZoomEffect - Undefined variable
Post by: Nilsy on November 07, 2014, 15:17:18 PM
Joomla 2.5.27
Virtuemart 2.6.12


Purchased this product zoom viewer about 3 weeks ago.
Is doing the job required nicely!

However, it is creating a fault that is getting logged on the error_log on the server, stating:
Undefined variable: CssFlexible in /home/SITE/public_html/plugins/system/flexibleZoomEffect/flexibleZoomEffect.php on line 62

Ok, this is just a notice... but after a few days, it mounts up to a bigger file...

So, any clues as to how I can stop this?

The sellers told me to add this statement: $CssFlexible = ''; to the file... but that didn't help, and they are not answering anymore.
I guess the question here is, is that statement correct, and if it is, how should I put that in place for it to do as intended?
Title: Re: flexibleZoomEffect - Undefined variable
Post by: GJC Web Design on November 07, 2014, 17:21:06 PM
try adding to your root index.php file at the top

error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );
Title: Re: flexibleZoomEffect - Undefined variable
Post by: Nilsy on November 11, 2014, 12:53:03 PM
Tried that...  :(
Didn't work.

But, just looking at your code, aren't you just trying to stop the reports, rather than fixing the issue?
Title: Re: flexibleZoomEffect - Undefined variable
Post by: jenkinhill on November 12, 2014, 13:10:04 PM
If you really want it fixed then go back again and ask the supplier of your viewer to provide a solution. When you buy a product you have the right to support.
Title: Re: flexibleZoomEffect - Undefined variable
Post by: Nilsy on November 14, 2014, 11:20:39 AM
As you see here (see attachment), they haven't answered for some time...

[attachment cleanup by admin]
Title: Re: flexibleZoomEffect - Undefined variable
Post by: GJC Web Design on November 15, 2014, 13:10:23 PM
QuoteBut, just looking at your code, aren't you just trying to stop the reports, rather than fixing the issue?

it is just an undefined variable - in an ideal world it would be defined  - but honestly - it is a meanless notice

either define the var first as the dev suggested,
or check whether it is set

if(isset($CssFlexible)) { do what ever it does  }

or null the notice


put error_reporting(E_ERROR);  at the top of plugins/system/flexibleZoomEffect/flexibleZoomEffect.php

Title: Re: flexibleZoomEffect - Undefined variable
Post by: Nilsy on November 15, 2014, 15:33:51 PM
I know it is a meaningless notice... which is why I just delete it.
The point is mearly that it means I must FTP over to the site, and delete it every few days, because it gets big. Sure, I don't mean GB big, just a few MB after some days.
It is just that it seems this should be a tiny thing to either fix or stop.
I am not a programmer, so I don't know how....

When I enter your code at the top... then this happens at the top of my page:



[attachment cleanup by admin]
Title: Re: flexibleZoomEffect - Undefined variable
Post by: GJC Web Design on November 15, 2014, 18:15:05 PM
I think you should try a little googling .....  http://bit.ly/1xrpVTP

in php tags obviously 
Title: Re: flexibleZoomEffect - Undefined variable
Post by: Nilsy on November 22, 2014, 16:49:23 PM
I asked a programmer I know. The fix took about 3.2 seconds.
Dead easy.

Solution was the first code that I was sent... place it at the end of the bracket at around line 39.