Topic-icon PostgreSql installation problems

Active Subscriptions:

None
12 years 6 months ago #39336 by everburninglight
Found another error:

Components->JFBConnect->User Map
An error has occurred.

0 Database query failed (error # %s): %s SQL=SELECT um.*, (SELECT COUNT(*) FROM joo_jfbconnect_notification WHERE fb_user_from = um.provider_user_id) sent, (SELECT COUNT(*) FROM joo_jfbconnect_notification WHERE fb_user_to = um.provider_user_id) received FROM joo_jfbconnect_user_map um ORDER BY id DESC LIMIT 0, 20
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #39420 by everburninglight
Any update with the reported errors?
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #39422 by everburninglight

everburninglight wrote:
An error has occurred.

0 Database query failed (error # %s): %s SQL=SELECT manifest_cache FROM joo_extensions WHERE element="com_jfbconnect"


Simple patch in install.php and it installs perfectly with Postgresql also.

$query->select('manifest_cache')->from('#__extensions')->where('element=\'' . $element . '\'');

However, the other errors are still there (page error if you try to register, retrieve username or password).
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #39423 by everburninglight
Commenting line 22 in mod_sclogin.php, all the other errors disappear:

//$jLogoutUrl = $helper->getLoginRedirect('jlogout');

Can you confirm that I'm doing nothing wrong that might have an impact on other parts of the module? I see that, when I log in, the log out button works just fine.
The topic has been locked.
Support Specialist
12 years 6 months ago #39435 by alzander
Sorry for the delayed response. We're planning a new patch release, due out late this week (if all goes well). That release will have our initial Postgres support. There will be more fixes from what we originally supplied to you, and we'll be going over the change you noted above. At that point, Postgres will likely still have some issues, but we'll be continuing to iron them out.

The release will also have some other minor fixes for issues that have arisen since the 5.2.1 release.

Can you confirm that I'm doing nothing wrong that might have an impact on other parts of the module? I see that, when I log in, the log out button works just fine

That getLoginRedirect code does 1 SQL query (which looks correct visually, but may have problems in Postgres when run) to check if the redirection URL is to a registered page. If so, we redirect the user to the home page on logout (so that they don't go to an ugly Joomla "You must login screen" right after they try to logout.

Commenting that out should cause problems... the user will just always be redirected to the home page or current page. If you're not experiencing any issues with it commented out, you should be fine.

I hope that helps, and thanks for the feedback!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 6 months ago #39444 by everburninglight
I suggest you cast to a bigint instead of an int. Postgresql defaults to int4, if I remember well. Since you cast a varchar[40]... a bigint is definitely more fit.
The topic has been locked.
Support Specialist
12 years 5 months ago #39518 by alzander
We've been trying to recreate the following error, but haven't been able to:
Database query failed (error # %s): %s SQL=SELECT * FROM joo_menu WHERE id=''
Are you still seeing that somewhere? If so, can you give any details of when?

As for the BIGINT conversion, we've already made a few changes to that block to make it compatible with both Postgres and MySQL. The conversion definitely should use BIGINT, but it's a conversion from a row that's already BIGINT, not VARCHAR(40). Not sure where you saw that..

Again, these updates will be in the v5.2.2 release, expected on Friday. I still don't think everything will be 100% perfect, but hopefully things will go pretty smoothly with Postgres at that time.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 5 months ago #39529 by everburninglight

alzander wrote:

Database query failed (error # %s): %s SQL=SELECT * FROM joo_menu WHERE id=''
Are you still seeing that somewhere? If so, can you give any details of when?


This was in SCLogin before that modification I sent you by email. The component was not installing properly and was giving that error. After successful installation, that error is gone.

alzander wrote: As for the BIGINT conversion, we've already made a few changes to that block to make it compatible with both Postgres and MySQL. The conversion definitely should use BIGINT, but it's a conversion from a row that's already BIGINT, not VARCHAR(40). Not sure where you saw that..


#__jfbconnect_user_map.provider_user_id is varchar(40) and is cast to int to be compared to #__jfbconnect_notification.fb_user_from, which is bigint (int8). See admin/models/usermap.php
The topic has been locked.
Support Specialist
12 years 5 months ago #39560 by alzander
Ahh.. Silly me. Forgot what our own query was doing.

Either way, that portion of the query is actually removed in the v5.2.2 release as it's not necessary to do on the front-end like we're doing there. We've limited it only to the admin area, which is done in a different part of the code (and updated appropriately).

As for the one note (in your email) about our limit clause being wrong.. you're correct, it's wrong. However, your solution wasn't the right one either (though it makes the query work). You removed the offset parameter entirely, which means pagination wouldn't work on your site (the first page would always be shown). We updated that query to:

$query .= ' LIMIT ' . $limit . ' OFFSET ' . $limitstart;

That's a MySQL/Postgres compatible way of specifying a limit with offset, just so you know. That will, obviously, be in the v5.2.2 release as well.

Thanks for all your feedback. Just so you know, I just added 3 months to your subscription. We know you ran into some issues, and were a bit of a guinea pig. I'm sure there will be more problems you run into with Postgres support, and we'd love to keep working with you to make our support for it even better.

Alex
The topic has been locked.
Support Specialist
12 years 5 months ago #39616 by alzander
Hey there, one final note I wanted to get to you before we release v5.2.2 (hopefully today, but may not be until this weekend/Monday). There's one issue with Postgres that we couldn't work around in this release. When you upgrade, please do *not* uninstall JFBConnect first. Normally, that's not a problem, but for Postgres it causes a few issues right now.

Thanks again for your patience, and I hope 5.2.2 goes smoothly for you.

Alex
The topic has been locked.