PDA

View Full Version : Partial Trades Not Showing - MystFell.com


NobodysHero
03-16-2015, 02:54 PM
I've received several complaints from my users (And have tested this out myself) that they're not able to view their partial trades. They get a notification that they have a trade from a user, but when they go to the page it's blank. Is there somewhere else they should be going?

tahbikat
12-10-2015, 08:50 AM
Don't mean to bump an old thread but I'm having sorta the same problem. Whenever users send trades to each other they get the PM in their inboxes but when they go to their My Trades it doesn't show anything. Anyone found a solution?

Hall of Famer
12-10-2015, 10:25 AM
Well does this only apply for partial trades, or is it not working for any kinds of trades(private and public too)?

tahbikat
12-10-2015, 01:59 PM
I tested it out and it seems as though if a user selects partial trade, without specifying a creature, it gets sent to the Partial Trades page instead of My Trades page.

Whereas if partial trade ISN'T selected, it gets sent to My Trades like it's supposed to.

When I accepted a trade from My Trades page, it threw up an error page saying "an item wasn't selected" but when I went to check my adopts, the trade did in fact go through.

Public trades also aren't working. They show up in the public trades list, but when I tried offering a trade to one of the public ones, it gives me an error saying something like "You cannot specify a trade recipient in a public trade!" even though the recipient is automatically already specified. :x


So all in all the system is kind of working like it's supposed to aside from the public trades, though it's kind of confusing.

Hall of Famer
12-10-2015, 11:18 PM
I see, I will take a look into this. Its very strange, I tested the script before and never had the same problem. I will see what I can come out with.

tahbikat
12-10-2015, 11:54 PM
Alrighty, thank you! ^^

Hall of Famer
12-11-2015, 04:52 AM
You are right, this does appear to be a bug. Its very strange since the public trade used to be working, and it was introduced in Mys v1.3.4 so nothing should've broken it. I will test the script again later today and let you know the fix I find.

Edit:
Found the fix, it was a glitch. Just one line of code will fix the public trade issue. To do this, go to script file trade.php in your root directory, and locate line 71:


$validator = $this->trade->getValidator("public");
Change to:


$validator = $this->trade->getValidator("private");
This should make your public trades work again. As you can see from the code above, when you reply to a public trade offer, you are in fact sending a private trade to the original poster(although your options may be limited, as the poster may specify exactly what he/she wants from a certain adoptable/item type). For this reason, the validator should validate the trade as a private trade, rather than another public trade. Hope this makes sense to you.

Also I've attached trade.php file in this post, you may just download it and replace your own trade.php file through ftp.

tahbikat
12-11-2015, 11:02 AM
Ahh thanks so much HoF! That was quick! <3
I'll add this to my site and test it out!

EDIT: Yikes, so I'm not sure if it's working because I'm getting other errors now for some reason.

Whenever I try to make a public trade, it says "Fatal error occured, that species doesn't seem to exist in database"

Also, when I try to revise one of my own public trades, it gives me an error saying "That user doesn't seem to exist"

Hall of Famer
12-11-2015, 11:07 AM
You are very welcome. ^^ Note the solution fixes public trades, I havent looked into partial trades since your last post was a bit confusing on whether there was a bug or not with partial trade. If there is, I will fix that too.

tahbikat
12-11-2015, 11:22 AM
Oh I edited my reply above. For some reason public trades aren't working at all now. :x Haven't tested the others

Hall of Famer
12-11-2015, 11:32 AM
I see, thats very strange. Did you change something in your database, are you sure the adoptables species exists? I tried on my demo site, and didnt have your problem.

And btw, I think at this moment only private trade can be edited.

tahbikat
12-11-2015, 11:06 PM
The only thing I can recall that I changed recently is in adopts.php I changed the adopts' default trade status to notfortrade instead of fortrade. Other than that I'm not sure, but I can check around and see if I changed anything else.

Ohh and that makes sense then, because I was trying to edit one of my public trades.

Hall of Famer
12-12-2015, 06:56 AM
I see, anyway it doesnt make sense that an adoptable's trade status will lead to an adoptable species not found. Do you recall any other changes you made to the script? Did you change anything in the table adopts_adoptables?