PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Classifieds Installation & Upgrades (http://www.photopost.com/forum/classifieds-installation-upgrades/)
-   -   Problem with Cookies (?) on Installation (http://www.photopost.com/forum/classifieds-installation-upgrades/121745-problem-cookies-installation.html)

tjanders December 24th, 2005 04:42 PM

Problem with Cookies (?) on Installation
 
I've installed PhotoPost Classifieds 2.42 recently and I'm getting some scripting errors and admin logon issues that might be cookie related. I'm running vBulletin upgraded to 3.5.2 and PhotoPost Pro. PhotoPost Pro is running fine. I've installed Classifieds on the same database as Photopost Pro, but this is a different database from vBulletin. The access to vBulletin registration is fine.

On the Classifieds, when I log on to adm-index.php , I'm sent to the main classified screen and it indicates "Welcome Administrator" on the blue table and gives me the admin links. But the top right hand logon screen does not indicate the Administrator is logged on. It therefore gives no option to log off. This doesn't match the situation in Photopost Pro.

When a guest or the administrator are using the software, it works fine. When any other user logs on, the logon in the top right changes to their name and allows a log off. However, everytime an ad is accessed, a scripting error (not an SQL error) results. An example error is:
Line:2
Char:1
Error: Syntax Error
URL: http://www.timstropicals.com/Classif...2&cat=7&page=1

This scripting error never happens to a guest or the administrator, which makes me think this is a cookie problem.

I've tried many combinations of cookie paths and cookie domains, but never get any better results - only worse.
vBulletin is currently set to blank for both
Photopost Pro and Classifieds are set to a path of "/" and a domain of ".www.timstropicals.com"

Any advice on getting Classifieds to work the same way that Pro does? Perhaps there's a conflict with running Pro and Classifieds on the same database?

Chuck S December 24th, 2005 04:57 PM

I would suggest vbulletin cookies set like this

cookie path /
cookie domain .timstropicals.com

photopost products like this

cookie path /
cookie domain .timstropicals.com

cookie prefix bb (you can double check this in the vb config file but thats the default one used)

I suggest if you downloaded classifieds a while ago make sure to redownload it as I show no java errors in the current download.

tjanders December 25th, 2005 12:17 AM

Problem with Cookies on Installation
 
Put the paths and domains as indicated in your post, but this made no change in the operation. The Classified software was downloaded and installed two days ago, so should be up to date.

I did notice one further unusual item which was there before, but I hadn't noticed. At the bottom of the classified pages when the administrator is logged on, SQL text is printing after the vBulletin footer in white that is barely noticeable. It prints on every page and seems to be giving a breakdown of the time to complete a task. On the home page, for example, it reads:

1: SELECT u.userid,u.username,u.email,u.password,u.usergroupid,u.timezoneoffset,s.sessionhash,u.salt,u.membergroupids FROM user u LEFT JOIN session s ON s.userid=u.userid WHERE u.userid='1' (0.00055 sec)
2: SELECT groupid,cpaccess,modaccess,uploadsize,uploads,comments,editpho,editposts,reqmod,highlight,bold,italic FROM cl_usergroups WHERE groupid=6 LIMIT 1 (0.00037 sec)
3: SELECT id,ugnoupload,ugnoanno,ugnoview,ugnopost,catname,parent,children,thumbs,header,footer,headtags FROM cl_categories (0.00080 sec)
4: SELECT id FROM cl_products WHERE approved=0 (0.00086 sec)
5: REPLACE INTO cl_iponline (userid,ipaddr,date,what,item) VALUES ('Administrator','24.68.202.56','1135489486','index','') (0.00029 sec)
6: DELETE FROM cl_iponline WHERE date < 1135488886 (0.00020 sec)
7: DELETE FROM cl_iponline WHERE date < 1135488886 (0.00017 sec)
8: SELECT c.id, c.catname, c.description, c.catorder, c.parent, c.thumbs, c.children, c.products, p.id, p.user, p.userid, p.date FROM cl_categories c LEFT JOIN cl_products p ON c.lastproduct=p.id ORDER BY c.catorder ASC (0.00139 sec)
9: SELECT cat,laston FROM cl_laston WHERE userid=1 (0.00114 sec)
10: SELECT item, count(*) FROM cl_iponline GROUP BY item (0.00026 sec)
11: SELECT data FROM datastore WHERE title = 'userstats' (0.00035 sec)
12: SELECT SUM(views), count(*) FROM cl_products WHERE approved=1 (0.00029 sec)
13: SELECT count(*) FROM cl_comments (0.00088 sec)
14: SELECT amt_sold,ads_sold FROM cl_stats (0.00065 sec)
15: SELECT c.username,c.userid,c.cat,c.product,c.comment,p.bigimage,p.cat,p.userid FROM cl_comments c LEFT JOIN cl_products p ON p.id=c.product WHERE c.comment != '' AND p.status=0 ORDER BY c.date DESC (0.00038 sec)
16: SELECT cat,id,title,views FROM cl_products WHERE approved=1 ORDER BY views DESC LIMIT 5 (0.00027 sec)
17: SELECT userid,date FROM cl_iponline ORDER BY date DESC (0.00025 sec)
18: SELECT id,user,userid,cat,title,bigimage,views FROM cl_products WHERE approved=1 AND status=0 ORDER BY date DESC (0.00037 sec)
19: SELECT id,user,userid,cat,title,bigimage,views FROM cl_products WHERE approved=1 AND status=0 ORDER BY views DESC (0.00040 sec)
20: SELECT id,user,userid,cat,title,bigimage,views, id*0+RAND() as rand_col FROM cl_products WHERE approved=1 AND status=0 ORDER BY rand_col DESC (0.00040 sec)

This text disappears whenever the administrator isn't logged in.

Perhaps I've got the setting wrong on the "Data directory virtual path
This is the web / virtual path to the data directory." The default was a URL and I accepted it. I've also tried paths starting with a / instead, but it doesn't seem to matter.

Time to try a reinstall of the classified software?

Chuck S December 25th, 2005 08:10 AM

well in pp-inc.php you can edit and set $showsqldebug=[b]0[/]b;

As far as vbulletin and classifieds login as long as the cookies are right and vb license number is correct you should be fine.

I registered a user and the login is integrated from what I see.

tjanders December 25th, 2005 01:58 PM

What will happen if I edit and set $showsqldebug=[b]0[/]b in pp-inc.php? Will this show coding so that I can research why SQL is printing on my admin pages? Will this turn off the SQL from printing at the bottom of the pages?

I reinstalled the software and it came out the same way - SQL at the bottom of every admin page and no ability to log out.

I also experimented with the reinstalled software and found the following problems:

1. scripting errors are caused by turning on "Allow Comments" for a usergroup. Turn it off and the scripting errors cease. I really don't want to turn this feature off, but I'm not prepared to run software with error notices in it.

2. Whenever you set a usergroup to "Allow Posting" it changes this to "No" and changes "Allow Edit Own Ads" from no to yes after saving. This has no effect on the actual operation, as posting is allowed but edits are not. It's very confusing that the usergroup screen changes settings and shows settings that actually are not valid. I noticed this with the first install too, but thought I must have made an error. I can consistently recreate this error.

3. Also on set up, I got errors for putting an apostrophe in my Title and Web Site Name. I'm forced to run classifieds without the apostrophe however they work on Photopost Pro.

Seems to me that I must have something set up wrong, as the first two items are pretty basic and shouldn't be happening.

Chuck S December 25th, 2005 05:48 PM

the edit meantioned is to not print the sql

You can try downloading the new classifieds 2.5 beta and run the upgrade script. There are some bugs that have been fixed from 2.42.

Otherwise there is a javascript bug fix for 2.42 in the bug forum

tjanders December 26th, 2005 01:16 AM

Can you point me in the right direction direction to find the javascript bug fix for 2.42 in the "bug forum"? I've looked through the Bug Reports, but couldn't find what you're referring to.

Chuck S December 26th, 2005 08:10 AM

http://www.photopost.com/forum/showp...7&postcount=12

tjanders December 28th, 2005 04:07 PM

The attachment didn't change how things run, but I installed the beta software and it addressed the javascript error on enabling comments, the SQL at the bottom of admin screens and apostrophes in the website title. This makes the product suitable for me to post it live now.

For your interest, the beta version does not address the error when setting a usergroup with the ability to post. It still changes this back to No after saving. This is a display error and not a database error. The beta version also continues to have a problem with highlight, italic and bold options for me too. Once a user edits their ad, any of these add ons chosen when the ad was established will disappear regardless of what's entered in the radio boxes. I've turned off these options for now.

I'm up and running. Thanks.

Chuck S December 28th, 2005 04:18 PM

Hello

If you have login issue it is most likely cookie issues. would be glad to assist if needed.

Now glad the beta corrected most issues. I will look at the database saved order.

Now as far as highlight bold italic these are one time purchases and you are allowed to edit them but this is to remove them. You can not change mix match etc. Simply not a feature.

I would suggest possibly since most customers wanted the ability to edit these that my suggestion would be since these features are something someone usually pays for that my thing would be to only show these on edit to the admin to remove if he wants.

We have more issues with how users wanted to be able to edit with people editing and removing things and thinking there is a code issue.

tjanders December 31st, 2005 07:50 AM

This still seems to be a code issue to me, but perhaphs it's because I'm testing with a zero dollar price. To get a feature like highlighting to work, it must be allowed for the usergroup. When the ad is established, the highlighting feature works great. Upon editing the ad, the box for highlighting is checked. Upon saving, even if no changes are made to the ad, the highlighting disappears. If you go back in to edit again, the check box is now empty. Presumably an adminstrator could reinstate this, but they wouldn't know it disappeared in the first place. I can't find any way to retain original highlighting, bold or italics if a user edits their own ad.

Chuck S December 31st, 2005 08:03 AM

Well since those are paid options at the time of ad placement and not changeable at all technically IMO they should not be shown.

Michael has stated time over they can not be changed so the only reason they where shown is for admin to remove them.

tjanders December 31st, 2005 03:59 PM

So how I do I avoid users seeing the option to edit these fields when they edit their post? If I turn off the Allow option they won't be able to participate at all. If I turn off editing instead, then they can't change any of the rest of their ad. I don't see how to differentiate between Allow these three functions and Edit these three for Users.

Chuck S December 31st, 2005 04:41 PM

Well how about you just make this one change and in editproduct which should fix the initial issue by adding these in bold

'origcat' => INT, 'category' => INT, 'edit' => STRING, 'delete' => STRING, 'myzipcode' => INT, 'price' => STRING, 'highlight' => INT, 'bold' => INT, 'italic' => INT));

tjanders January 1st, 2006 03:57 AM

Seemed like a great idea to me. No change in actual operation though. When the user edits their ad, the three items have the appropriate boxes checked as per their original choice. Upon the User saving edits, it doesn't matter whether the boxes are changed or not - they are automatically reset to Null.

There's no need to bother further with this now. I'll simply turn off these three options and you can consider for a subsequent upgrade. Thanks.

Chuck S January 1st, 2006 05:58 AM

well not much more I can say here as that is the proper fix. Make sure to download the build reupload all files except config and make this change.

In fact for the beta since it fixes this very well I will be doing exactly as stated before only showing these for admin. Here are two ads as example that where not highlighted bold etc before I edited them and now they set fine and work.

http://www.reeftalk.com/classifieds/...hp?cat=2&page=

tjanders January 1st, 2006 07:25 PM

My most sincere apologies on this. It's clear that you really know your stuff and I didn't actually do what was requested. I incorrectly assumed that Frontpage was updating my server for the changes I made to the editproduct file on my hard drive. I was forced to delete the file on my server in order to post the update. No surprise for you - this change works beautifully.

Thanks for being so knowledgeable and going the extra distance on this one.


All times are GMT -5. The time now is 10:43 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97