Install Joomla with PostgreSQL database type, select to install a sample data but don't select Test sample data, otherwise you get SQL errors (I have a pull request for it at https://github.com/joomla/joomla-cms/pull/4436/commits)
Edit a sample article, save it.
Article is saved successfully.
Article isn't saved because of fatal error:
Notice: Undefined property: stdClass::$Field in /libraries/cms/helper/helper.php on line 114
Fatal error: Cannot access empty property in /libraries/cms/helper/helper.php on line 115
The function getDataObject() of JHelper class tries to get the property "Field" which is only available in MySQL. In PostgreSQL we call it "column_name". This is a comparision of ID field:
PostgreSQL:
[id] => stdClass Object
(
[column_name] => id
[type] => integer
[null] => NO
[Default] => nextval('pgj_content_id_seq'::regclass)
[comments] =>
)
MySQL:
[id] => stdClass Object
(
[Field] => id
[Type] => int(10) unsigned
[Collation] =>
[Null] => NO
[Key] => PRI
[Default] =>
[Extra] => auto_increment
[Privileges] => select,insert,update,references
[Comment] =>
)
Instead of checking if the table is a JDatabaseDriverMysql object or a JDatabaseDriverPostgresql object in getDataObject() function to get the correct property, I think we can change the properties's names of PostgreSQL to be the same with the ones in MySQL.
Please see
That is how I've fixed this problem so far. But I don't know if this will break Joomla in other places, so your comments are suggestions are always appreciated. If it looks fine then I will send a pull request.
Category | ⇒ | Postgresql |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-03 17:39:32 |
Labels |
Added:
?
|
My bad, this issue was fixed already. I messed up my Joomla repository and kept using an old version. Sorry!