0

I am having problem in virtuemart with joomla 2.5.11. There are showing some notice and in home page virtuemart is not showing anything except these notices.

Notice: Undefined property: TableCategories::$virtuemart_id in C:\xampp\htdocs\joonla\Joomla_2.5.11-Stable-Full_Package\components\com_virtuemart\views\categories\view.html.php on line 57

Strict Standards: Declaration of VirtueMartModelMedia::store() should be compatible with that of VmModel::store() in C:\xampp\htdocs\joonla\Joomla_2.5.11-Stable-Full_Package\administrator\components\com_virtuemart\models\media.php on line 435

Strict Standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile() in C:\xampp\htdocs\joonla\Joomla_2.5.11-Stable-Full_Package\libraries\joomla\html\parameter.php on line 512

Strict Standards: Creating default object from empty value in C:\xampp\htdocs\joonla\Joomla_2.5.11-Stable-Full_Package\components\com_virtuemart\views\categories\view.html.php on line 82

Touki
  • 7,465
  • 3
  • 41
  • 63
blue viper
  • 1
  • 1
  • 3
  • These are not errors. They are just warnings. Your page should work normally when you take it to a live server. – mavrosxristoforos Sep 25 '13 at 10:00
  • I am currently working on localhost as this is my practice work. is there any way I can ride of it. thanks you very much for your comment. – blue viper Sep 28 '13 at 13:01
  • Easiest way is to turn off error reporting in php.ini, but I recommend you try to fix these issues separately, by altering the code, since you want to learn. In localhost, I prefer to keep reporting on, so that you can debug easily. – mavrosxristoforos Sep 28 '13 at 15:55
  • I am trying as you have said in here. But it would be better if you give me a details way about this matter or a link from where I can find some good thing to work out. I am waiting for your answer. I really very new in this things and need a lot of help. waiting... @mavrosxristoforos – blue viper Sep 30 '13 at 06:55

1 Answers1

0

After you make sure you are running the latest version of Virtuemart, if you want to fix these warnings (although keep in mind that they are just warnings and they will probably come back when you update, if they are not fixed by Virtuemart), then you should follow the simple instructions given by each error:

Notice: Undefined property: TableCategories::$virtuemart_id in x.php on line y

This means that there is a property being called on the line y of the file x. In this case, you should find where the TableCategories class is instantiated and add a default $virtuemart_id.

Strict Standards: Declaration of VirtueMartModelMedia::store()
should be compatible with that of VmModel::store() in x.php on line y

This means that two function declarations of two related class are not declared the same way. Example:

function Parent::a($param1, $param2) {}
function Child::a($param1) {}

It is obvious that the child should also have a $param2 parameter passed into it. If you want to alter such a thing, you should know that there are various calls to the function, obviously without the (e.g.) second parameter. Best way to handle this, since you want to get rid of the errors, is to make the child call equal to the parent, but making sure that there is a default value as in $param2 = 0 to avoid future errors.

Strict Standards: Declaration of JParameter::loadSetupFile()
should be compatible with that of JRegistry::loadSetupFile() in x.php on line y

If you want my opinion, avoid this one. In general, it is best to keep your hands off Joomla code, unless you are really sure about what you want to do, and that it is the only way to do so. Although, do note that there is an update for Joomla 2.5, in case you are still on 2.5.11.

Strict Standards: Creating default object from empty value in x.php on line y

For this last error, please read this.

Community
  • 1
  • 1
mavrosxristoforos
  • 3,573
  • 2
  • 25
  • 40
  • I will try this things out and if I get anything worth.. I will directly give that in here. thanks a lot for explaining all these things so nicely. – blue viper Sep 30 '13 at 08:11