Did I Screwed Up?

Hello guys,

I am mostly a graphic designer enthusiast, but for needy times I started putting some effort in my HTML/CSS skills, after all I need them to be more ‘fluid’ into website construction. I got a little job today with a client requesting some changes in his Magento store. I first did all the modifications into Chrome Web Developer/Firebug and then I passed them to the FTP address, to their specific CSS location that was shown to me via browser. I first uploaded one code and everything was smooth, then I uploaded the second code and everything also went good. I was happy. I finally had done a HTML/CSS job successfully. However, after some ‘live debugging’, when I was fixing some little errors that was still appearing on the main page, I refreshed and I’ve got a nasty php error.
Then I started wondering, or my client fucked up in his system and CP of Magento, or my CSS modifications fucked it up someway. Is it possible?

This is the feedback of the pages, it renders the ‘top header’ the ‘logo and search header’ but nothing belows it.
[embed=425,349]Fatal error: Call to a member function getData() on a non-object in /home/public_html/app/code/local/TM/NavigationPro/Block/Navigation.php on line 535[/embed]

Can I fix it somehow?

I’m glad for your attention,
Vini

Vini, welcome to the site. We might be able to help, but, you did not really explain the error or the code.

First, your error message is due to, in my wild guess, one of two possible issues. One, you might have made
a change to the calling line of the function or where the data sent to the function is created. Or, two, you
might have altered the function itself by altering lines in the function code area. Since we do not have any
access to all of that code, we can only guess.

Now, since you are an artist and graphic designer, you might not understand how to handle programming or
editing a large site. Therefore, I am going to mention a few things you must learn. First, and foremost, you
should NEVER make your changes on a live site. You always should have a copy of the live site, usually on
your local computer and test there. Then, when working 100%, you upload the new version to the live site.

You should also keep many levels of backups of the site. You should create a new level of backups every
time you make a large amount of changes and also, on a regular basis such as once a week. In this way,
you can go back one or three levels to repair changes that you made that trashed your site.

Now, with those comments made, onto the error. You will need to look at the code in the site page that is
named “Navigation.php” and look around the lines at about number 530-540 and see what arguments are
being shipped off to the code in the function named “getData()”. The error message is telling you that you
sent in invalid argument to it. Therefore, if the line at #535 is something like, in general terms is
“getData($productID,$salesDate,$salesCart)” You would be sending three values such as a numeric ID for
the product number, a date format for the date of sales and then an entire object which would be the entire
cart for that sale. Without seeing a sample of your code, we have no idea where to start with. But, I would
guess that you have an object passed to this function that you changed somehow.

Well, doubt this helps much, but, HTML and CSS have little to do with a function code issue. Therefore, I
would guess it has nothing to do with changes to HTML/CSS. My guess is that you altered some lines of
code that were PHP code, not HTML/CSS. Also, you mentioned “Live debugging” and fixing some “small
errors”. I would have to guess that one of these changes “broke” the live system. Again, you never test
on a “LIVE” system…

Good luck. Let us know what we can help with. Small samples of code in the area
that is failing will help us. (use PHP tags for showing us samples of your code…)

Sponsor our Newsletter | Privacy Policy | Terms of Service