Topic-icon Postgres installation issues

Active Subscriptions:

None
9 years 8 months ago #46018 by gamesberry
Hi,

I've taken a subscription today as the soft seems promising, and bad luck, first install, first problem.
I think the attached file solve this.
Update-sql-updated.sql

But... second install not much better.
Requête de base de données échouée (erreur # %s): %s ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction SQL=INSERT INTO "fhj_assets" ("name","title","parent_id","level","lft","rgt") VALUES ('com_modules.module.88','SCLogin',18,2,72,73) RETURNING id
Sorry, it's in french, it says something like : "query failed (...): error : transaction canceled, commands ignored till the end of the transaction block".

Any advice ?
The topic has been locked.
Support Specialist
9 years 8 months ago #46040 by alzander
I'm sorry for the issue you ran into with the 6.1.0 SQL update file. I've added an issue to our tracker to fix that file in the next release.

Postgres is definitely strict about syntax. The assets error your getting is likely because the SCLogin module, and possibly some other files, were installed when JFBConnect was installed. When the SQL error occurred though, it left those files installed. When you try to re-install, the database is in an incorrect state.

What I'd recommend is:
First, unpack the installer zip file and fix that 6.1.0.postgre.sql file with the #__ instead of hfnqx. Then:
1) If possible, revert to a backup before you tried to install JFBConnect. Then, try to re-install again.

If you don't have a backup, or don't want to restore:
2) Go to the Installer -> Manage area of Joomla. Uninstall the SCLogin module.
* Also, search for jfbc, Open Graph, scsocial and uninstall any JFBConnect plugins or modules that are listed for those searches.
* Then, try to install again.

Hopefully, one of those get you going. We did an immense amount of testing on the 6.0 release, early this year, for compatibility with Postgre. Unfortunately, very few users use it and Joomla 3.3.0 had multiple Postgre bugs, which caused further testing and development when we released 6.1 more difficult.

We'll gladly help get you going however we can though.

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

None
9 years 8 months ago #46069 by gamesberry
Hi,

Completely removing JFBConnect and reinstalling it with the corrected sql file seems to greatly improved things. A short check lets me think it simply works.

SClogin is broken in the backend, throwing a SQL error in the title tag (!) : SQL=SELECT template FROM fhj_template_styles WHERE client_id = 0 AND home = 1.

Apart from this problem, JFBConnect seems quite a master piece :-)
The topic has been locked.
Support Specialist
9 years 8 months ago #46077 by alzander
Glad to hear things are moving along.. though still with bugs. Postgres support is something we advertise, and I apologize you're running into such issues.

For the SCLogin module, if you edit the /modules/mod_sclogin/fields/theme.php file, you'll find the offending query at line 25:

$query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";

Updating that to the below should make it work for you:

$query = $db->getQuery(true);
$query->select("template")
->from("#__template_styles")
->where("client_id = 0")
->where("home = 1");

That uses the Joomla SQL abstraction layer, which we should have been doing already, to parse the query into Postgre properly.

Please let me know if that helps. I hope there was some sincerity about JFBConnect being a 'masterpiece', even with these issues :)

On an unrelated topic, I'm assuming you use other extensions for Joomla on your Postgre system.. do you run into many issues with them? As noted, we put a lot of effort into the Postgres support, but haven't seen a huge uptake (obviously, with some silly bugs still tucked away in our product). I'm curious how other extension support is going for you, if you don't mind letting me know.

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

None
9 years 8 months ago #46094 by gamesberry
Don't apologize ! :-)
You're one of the few who have just made the effort to put an eye on postgresql version.

I'll test your corrections asap (next week I guess).

We had seen before deciding to go on with joomla postgres that it wasn't too mature... and yet it wasn't ! :-)

Bugs are sure annoying, but it doesn't change the fact the features of the product are great, and you're there to investigate the bugs we bring to you. Just maintaining the component with Facebook regular change in their API is a big job to me. So, yeah, of course, it is sincere, JFBConnect features rocks.

As for the Pgsql support... Well, I won't be too false saying there aren't at all. Best made extensions use the abstraction layer but don't provide the sql file, so it is not usable without prior work. We even had to make some mods inside Joomla itself... Our project needs a strong database system so we are stuck with pgSQL, but it's not a straight development at all. Your pgSQL support is a bit buggy, but at least, it exists, and just that is damn cool ! :-D
The topic has been locked.
Support Specialist
9 years 8 months ago #46119 by alzander
D,
Thanks for the feedback. You never can read into sarcasm vs seriousness in some posts, so I appreciate the time to let us know that the state of the Postgre ecosystem and JFBConnect itself.

Definitely keep me posted on how the above fix goes. Both the changes from this post are already checked into our repository and will be available in the next release, just so you know.

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

None
9 years 8 months ago #46148 by gamesberry
It's now okay with the sclogin module. Thx.

New one :-)
In Open graph > new ====> Failed query : %s SQL=SELECT * FROM fhj_opengraph_object WHERE published=1
The topic has been locked.
Support Specialist
9 years 8 months ago #46156 by alzander
Looks like there's a few queries that need to be taken care of in the Open Graph and Requests (Facebook Invitations) stuff. I've taken a note of the ones we've found, and we'll get those updated before the next release.

For the query you specified, please edit the /administrator/components/com_jfbconnect/models/opengraphobject.php file. Around line 90, you'll see:
$query = "SELECT * FROM #__opengraph_object";
        if ($publishedOnly)
            $query .= " WHERE published=1";
Update that to:
$query = $this->_db->getQuery(true);
$query->select('*')
  ->from($this->_db->qn('#__opengraph_object'));
if ($publishedOnly)
  $query->where($this->_db->qn('published') . '=1');
There are some delete queries above that that we'll have to fix as well.. so you may run into issues if you delete before then.

While you're editing and getting Open Graph setup, you'll need to edit the opengraphaction.php file in the same directory.

Toward the bottom, you'll see:
private function setObjectMappings($actionId, $objects)
    {
        $filter = JFilterInput::getInstance();
        // Delete all previous associations

        $this->_db->setQuery("DELETE FROM #__opengraph_action_object WHERE action_id = " . $actionId);
        $this->_db->execute();

        foreach ($objects as $objectId)
        {
            $objectId = $filter->clean($objectId, 'INT');
            if (is_int($objectId))
            {
                $this->_db->setQuery("INSERT INTO #__opengraph_action_object (`action_id`, `object_id`) VALUES " .
                        "(" . $actionId . ", " . $objectId . ")");
                $this->_db->execute();
            }
        }
    }
Replace that whole function with:
private function setObjectMappings($actionId, $objects)
    {
        $filter = JFilterInput::getInstance();
        // Delete all previous associations
        $query = $this->_db->getQuery(true);
        $query->delete($this->_db->qn("#__opengraph_action_object"))
            ->where($this->_db->qn("action_id") . '=' . $actionId);

        $this->_db->setQuery($query);
        $this->_db->execute();

        $columns = array('action_id', 'object_id');
        $query = $this->_db->getQuery(true);
        $query->insert($this->_db->qn("#__opengraph_action_object")
            ->columns($this->_db->qn($columns));       

        foreach ($objects as $objectId)
        {
            $objectId = $filter->clean($objectId, 'INT');
            if (is_int($objectId))
            {
                $query->clear('values');
                $query->values($actionId . ',' . $objectId);
                $this->_db->setQuery($query);
                $this->_db->query();
            }
        }
    }
The above was written and doesn't seem to blow up, but I didn't fully test. Please let me know if you run into any issues.

We're planning the 6.1.2 release either for Friday this week or early next week, depending on any other minor issues found and general timing constraints. We'll try to find any other queries that we may have missed that aren't using the abstraction layer by that release.

As always, keep me posted on what you find or if you need anything else.

Thanks,
Alex
The topic has been locked.