Undefined variable

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Dec 10, 2014 7:10 pm
Reply with quote
Report this post
Hi,
The error_log file in my site records this notice over and over, so it makes the file size increases unstoppable. This cause my limited hosting run out of space.
Please help!

Error log:
Code: Select all
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:30 UTC] PHP Notice:  Undefined variable: BrowseTotalProducts in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213
[08-Dec-2014 15:34:31 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:31 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:31 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:32 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:32 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:32 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:32 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
[08-Dec-2014 15:34:32 UTC] PHP Notice:  Undefined index: url_overrides in /home/hoatayne/public_html/modules/mod_news_pro_gk5/data_sources/com_virtuemart/model.php on line 307
User avatar
Expert Boarder

teitbite
Fri Dec 12, 2014 11:43 am
Reply with quote
Report this post
Hi

Please send me an access to ftp, so I'll check.
User avatar
Moderator

teitbite
Sat Dec 13, 2014 11:38 am
Reply with quote
Report this post
Hi

Fixed.

This line: /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/category/default.php on line 213

Code: Select all
$BrowseTotalProducts = count($this->products);


was only accessible whae option to show category details was there. I moved it away of the condition.

For the other message I think You just need to edit NSP GK5 and just click save. There were new element in update, but was not created in Your copy.
User avatar
Moderator

GK User
Thu Dec 18, 2014 10:51 am
Reply with quote
Report this post
Hi buddy, the notice "...templates/gk_storebox/html/com_virtuemart/category/default.php on line 213" has disappeared.
I've just update the NSP GK5 to the latest version, and the notice about NSP has gone also.
But now the other notices reported in error log. This is a copy:
Code: Select all
[18-Dec-2014 09:38:25 UTC] PHP Notice:  Undefined variable: alert in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/productdetails/default.php on line 376
[18-Dec-2014 09:38:28 UTC] PHP Notice:  Undefined variable: alert in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/productdetails/default.php on line 376

[18-Dec-2014 09:38:29 UTC] PHP Notice:  Undefined variable: taskRoute in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/cart/default.php on line 144
[18-Dec-2014 09:38:29 UTC] PHP Notice:  Undefined variable: taskRoute in /home/hoatayne/public_html/templates/gk_storebox/html/com_virtuemart/cart/default.php on line 144

[18-Dec-2014 09:43:48 UTC] PHP Notice:  Undefined property: TableCategories::$virtuemart_id in /home/hoatayne/public_html/components/com_virtuemart/views/categories/view.html.php on line 57
[18-Dec-2014 09:43:56 UTC] PHP Notice:  Undefined property: TableCategories::$virtuemart_id in /home/hoatayne/public_html/components/com_virtuemart/views/categories/view.html.php on line 57


Something went wrong after our modification?
User avatar
Expert Boarder

teitbite
Thu Dec 18, 2014 12:24 pm
Reply with quote
Report this post
Hi

I do not think so. It could with /category/default.php file, but we have not touched the other one.

First issue looks to be becuase of a newer VM version used than template is prepared for. I've added this to /productdetails/default.php

Code: Select all
                  if (isset($this->product->step_order_level))
                     $step=$this->product->step_order_level;
                  else
                     $step=1;
                  if($step==0)
                     $step=1;
                  $alert=JText::sprintf ('COM_VIRTUEMART_WRONG_AMOUNT_ADDED', $step);


In /cart/default.php I just removed $taskRoute. I cannot see this in orginal vm files.

Last one is in VM core files: /components/com_virtuemart/views/categories/view.html.php so I do not know woh to help.


Please check if this changes has not broke anything.
User avatar
Moderator

teitbite
Thu Dec 18, 2014 1:17 pm
Reply with quote
Report this post
Hi

I've just found Your other PM. You are asking for a better explanation what to do. You do not have to do anything except for checking if this changes has not broke anything in add to cart / checkout process.

I have already made all of them via FTP access You have me.
User avatar
Moderator

GK User
Sat Dec 20, 2014 5:49 pm
Reply with quote
Report this post
Thank you buddy. The site work ok, but there are still many notices recorded in the error_log, make the file size increase very fast. You can access by FTP and have a look on the error_log by yourself. I'm not sure if it was caused by our first modification.
Thanks!
User avatar
Expert Boarder

teitbite
Sun Dec 21, 2014 4:41 pm
Reply with quote
Report this post
Hi

Ok. Just one problem ;/ I cleared my PMs and do not have an url to Your website anymore. Can You please remind me ?
User avatar
Moderator

GK User
Mon Dec 22, 2014 7:45 am
Reply with quote
Report this post
Ok. Please check your PM
User avatar
Expert Boarder

teitbite
Tue Dec 23, 2014 6:23 pm
Reply with quote
Report this post
Hi

There were no new errors. Just looks like the ones I've fixed got overriden. I've corrected it again and no new lines in error.log visible.
User avatar
Moderator


cron