PDA

View Full Version : Admin Sorting - Solved


Valtar
07-13-2005, 04:37 AM
This isn't a major problem for me, as I happened upon it by accident. I just thought I would bring it to your attention. In my Admin area, the sorting buttons for Links, and Featured Links returns this when pressed.


Fatal error: Call to a member function on a non-object in /home/--------/public_html/admin/dir_links.php on line 72

It only seems to happen on the Links and Featured Links Areas. The other areas Categories, Approve Links, and Approve Categories all seem to be working properly. Just thought I would pass this information onto you in case it is a bug, or others start seeing the same issue.

Note: User name was omitted from Fatal error.

Johnny

c_t
07-13-2005, 10:00 AM
Me too!

Fatal error: Call to a member function on a non-object in /home/______/public_html/candy/admin/dir_links.php on line 72

I get this in admin when i click directory > links, although not every time o_0

It also occurs if i try and sort the data by clicking at the top of a column.

Cheers

Steve

Same issue here
http://www.phplinkdirectory.com/forum/viewtopic.php?t=248

minstrel
07-13-2005, 03:47 PM
Me three.

Additionally, in order to get the page to load, I had to logout and log back in to the admin panel, since I couldn't otherwise get the page with the default sort order.

David
07-13-2005, 04:41 PM
I'm trying to get some help now. Support may me a little sketchy over the next few days while dcb is gone (until the 18th), but I may luck out and get a decent helper. I'm did a job request at a couple of freelancer sites. If anyone cares to chip in some $$$ let me know.
Thanks,
David

minstrel
07-13-2005, 06:10 PM
Donation sent via PayPal.

You might check administrator noppid or the member looking for work here: http://www.vbwebmaster.com/forums/showthread.php?p=7146#post7146

David
07-13-2005, 06:51 PM
That's a great help...thank you very much. :)
I've got a couple of people looking at couple of the bugs now. Hopefully, we'll start getting some solutions shortly.

Ap0s7le
07-13-2005, 07:01 PM
Concerning this issue I believe I have a fix.
I'm going to contact David, have him make the change and see if it works for him before I release it.

Thanks

Ap0s7le
07-13-2005, 07:56 PM
Post removed as not to provide faulty info.

-Ap0

Valtar
07-13-2005, 08:03 PM
Ap0s7le,

Very nice work! that fixed mine.

Thanks,
Johnny

achafik
07-13-2005, 09:14 PM
Hello, that may work. but there is a better solution.

Open "admin/dir_links.php"
On line 63 Find: Content visible to registered users only.
Replace With: Content visible to registered users only.

if you would rather download the fix, it is located here:

Zip: http://www.achafik.com/accounts/LinkDirectory/Fixed/admin/dir_links.zip
PlainText: http://www.achafik.com/accounts/LinkDirectory/Fixed/admin/dir_links.php

Ap0s7le
07-13-2005, 09:43 PM
achafik, you're right.

I was going to look it over more later this evening once I finish on a project I'm working on.

Thank you for keeping me from having to do it.

later

achafik
07-13-2005, 11:59 PM
No problem :)

minstrel
07-14-2005, 02:58 AM
:shock: Yikes! :shock:

I had to stare at those two lines for about 5 minutes before I could even spot the difference... :?

springdot
07-14-2005, 08:54 AM
achafik, that doesn't work for me - I still get the same error when sorting by name or hits... I haven't tried any of the other columns, as I'm assuming they will error too.....

Ap0s7le, your change DOES work for me though!! So that is the one I am using for the moment... is it actually flawed as achafik was suggesting?


Thanks
James

Ap0s7le
07-14-2005, 09:08 AM
Hi James,

Both solutions work under my dev version of RC4, if mine works for you then use it, if his does than use that one. Either way as long as the job gets done for you.

I'm sure I speak for both of us when we say we just want it to work well.

Thanks for taking the time to let us know.

Regards,

springdot
07-14-2005, 09:12 AM
Thanks for all your help guys - I definitely appreciate it, and I'm sure everyone else does too.

c_t
07-14-2005, 09:34 AM
Ap0s7le, Thank you so much.

David, donation coming your way shortly. :D

David
07-14-2005, 04:09 PM
Very cool, and note that Ap0s7le got a little donation for his help here.
Thanks Ap0s7le!

Ap0s7le
07-14-2005, 06:21 PM
And it was much appreciated David, surely made me smile yesterday.

later!

just-4-teens
07-25-2005, 05:47 PM
For anyone that cant get the previous posted fix to work try this.

i was messing around with this since that above still caused an error so i simple replaced

On Line 63
Find
Code:
Content visible to registered users only.

Replace with:
Code:
Content visible to registered users only.


the only difference being there is a "." before the "="

im not php coder but that worked for me.

Ap0s7le
07-25-2005, 07:11 PM
Yup, because the "ORDER BY" is called already thus you're adding a second which will error out on you.

His post didn't have that in it before I didn't think, I don't know what happened.

later

achafik
07-26-2005, 02:48 AM
lol, that's what I had (and it's what it should be)... everybody likes ap0s7le more though :P