How to use Userfix.php for Classifieds & RP?
I've got all three PP, PPC and RP. I switched forums today from PHPBB to vB and I'm starting to work on the PP products.
I've started with PP Classified and got the database changed for integration, but need to update the users IDs now.
I've got userfix.php but it seems to be just for PP. What should I do for Classifieds and ReviewPost?
There are specific scripts in the import forum also for reviewpost and classifieds
Thanks I got em.
But I'm running classfix.php and it seems to be doing something weird so I can't tell if it's an error or not.
It's using the vB header and footer. It says, "PhotoPost Classifieds Upgrade
Preparing to update ads userids..." Above the vb header. Then in the middle of the page it says: Guitars and Gear For Sale Message
We're sorry, but the system experienced an unrecoverable error. Please try again later."
then there is a lot of white space followed by the vB footer.
I can't imagine that this is correct?
You would have to say in your pp-inc.php remove this in bold to see your mysql error. I don't see anything wrong with the script
You lost me? "You would have to say in your pp-inc.php remove this in bold..."
I'm not understanding this. First, I see nothing in bold at all. Just a code box.
Could you take another shot at telling me what to do?
The line I posted above is right in pp-inc.php and you can remove the part in bold from that line. That will make the error show up on upgrade to see what your issue is.
OK got that. (Though on my system the "bold" part is only ever so slightly bold, if at all. Not really enough to tell a difference but I got an idea of what you meant. You've told me to look at the bold part in one of your posts before and then I couldn't see anything bolder then the other, as well.)
Here's what I got in return after making that change in pp-inc.php:
I made his username Ramblin Ray yet the error still came back as Ramblin' Ray.
Huh? How could that be?
How about simply doing this in userfix.php Add the code in bold here
That seemed to do it.
But when I look at the Classifieds (the application) all the users are user=0 at least in the application they are. Do I need to do a Scan Database Resync Users and Comments or something?
I looked in the db at the class_ user table looks like it has userids, not zero's. The usergroupid is 0 on them all, though.
When I installed PP Classifieds I was userid=2 in my PHPBB forum. I made the first test ad and tested it sold, etc. In my new vB3 forum I am userid=3. If I look in my vB3 user table I see me as userid=3 and the importuserid=2. I ran the classfix.php now after your change and it went through all the steps. But when I look in the PP Classifieds user table I see userid=2 as the very first entry that should be me. Shouldn't it show userid=3 or am I missunderstanding how it works?
Did you properly integrate with vb3?
This script will update the userid for the based on their username after you properly integrate with vb3
Yes I did integrate it with vB3. Every step was followed and the application reflects that in every way including the Admin CP. But, now, after running classfix.php, if I put my mouse over the username on ANY random ad it shows and links to:
"http://www.mydomain.com/classifieds/member.php?uid=0". It's this way on every one of the ads.
If I click on "memberlist" inside Classifieds I see ALL of the usernames of folks with ads... but all of the links link to uid=0
Should I try the "resync" in scandatabase or rerun the classfix.php?
It's obviously putting usernames with ads -- whether it's correct or not I have no idea. I've attached a screenshot of the "memberlist" first page from PP Classifieds and here is the link info shown in the links for every username in the screenshot:
I do have one question about vB3 integration. In the user registration admin entry. Before switching I used phpbb2 for that field. Now I'm using vb3.
I wasn't 100% sure what I should use there, but since that was the name of the integration file in the classifieds "forums" directory I figured it was correct. And, I'm able to log on and stay logged on with it set that way.
I was not 100% sure what, exactly, that should be. So you could confirm that.
But as I said. I'm recognized by PP Classifieds as logged in and as Admin with that setting.
ALSO, I did give my vBulletin database tables a prefix (vB_) and that is non-standard. I think the vB3 standard is no prefix. I have it set up that way in PP Classifieds -- that my vB tables are all prefixed with vB_. I do see that classfix.php factors in the pp classifieds db prefix.
Is it possible that the classfix.php assumes that the vB3 tables have no prefix -- and it doesn't pick up that setting from the "forum settings" field in Admin???
I've attached a screenshot of my Classifieds Products table from phpmyadmin. You'll see the usernames... and the userid is zero on all of them.
Try running the script again I do not see a thing wrong with the script itself. Clearly we grab the userid from the and issue an update command. I would need phpmyadmin login info and login info to assist if you wish.
Re-ran the script but no joy. I checked and the userids are updated and correct for everything else but "products". The "products" table shows ALL users with a uid of 0.
However, I checked the "comments" table and the UIDs are there and I checked them against the VB user table and they appear to be correct. Feedback has UIDs too, but I didn't check them for accuracy. I don't have any bids.
Could the "add slashes" line you had me add to classfix.php have an effect on products only? And, as I asked before... could the vB_ prefix effect the process in any way?
Maybe I should reapply a backup of the Classifieds db and start from scratch.
I need to get this solved so that I can reopen PP, RP and PP C.
Thanks for your help.
Well remember your usernames should never be stored with a slash so this could yes be an issue for those names but not all. Addslashes are only added to make the query work. They are removed by mysql. Now if you have a larger database issue where Slammin' Sam's is stored as Slammin\' Sam\'s then thats an issue that should not be there.
I do not see any issues in the script by it would not work. Try downloading the script. I did addslashes on every part and see if things work.
It is classfix.php that's changing all the userids in the "Products" table to zero.
I restored the products table from my pre-migration backup. All the items in the Products tables had user IDs (the old PHPBB uids). I ran Cleaner.php and they were all changed to zero.
Could it be anything BUT the "Add Slashes" routine you had me add to the script?
I see no issue as stated and it seems to work fine on my site so redownload and try it again. I already offered to help a few posts up
Thanks Chuck, I keep thinking we've just about got it.
I'll try the redownload and if all else fails take you up on your kind offer.
OK Here's what happened:
I downloaded the classifix.zip again, and replaced the php file on my server.
I ran classfix.php and got the original error on "Ramblin' Ray". Which was surprising. But it was the identical error. I didn't expect to get that error because you said you had added the 'add_slashes" commets all the way through the script. Did I misunderstand?
Anyway, after running classfix and getting the error, I checked the database for "Products". All the userids had been correctly changed up to the user BEFORE Ramblin' Ray. From that point on none of the userid were changed at all.
So it seems that this one record from Ramblin' Ray -- which is smack in the middle of all records in the products table is stopping the process.
Why don't I simply delete this guy's ad in the product table and run classfix again. That should fix it.
But you should also know that your script doesn't allow for apostrophe's in the username.
Let me know what you think I should do.
I went ahead and changed Ramblin' Ray's username in both the Products table and vb_users to Ramblin Ray without the apostrophe. I did a search to be sure he was only listed once in Classifieds and he was.
That fixed it.
The program ran, changed the Uids just fine.
But still your import script doesn't work with apostrophe's in the username. I would guess it will be the same with quotes.
I'll certainly do some checking of my database before I work on Review Post and PhotoPost.
Thanks for all your help. Don't know if we "fixed" anything be we learned a lot.
|All times are GMT -5. The time now is 12:30 PM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0