Result: The article with title "Joomla! Testing" has 4 tags assigned: Tag names "2", "3", "4" and "5".
(Ignore the error popup alert shown in step 3 with PostgreSQL when opening the article in edit mode. I'll write another issue soon).
Result: The article with title "Joomla! Testing" has 1 tag with name "2" assigned.
No difference in testing sample data between MySQL and PostgreSQL database.
Differences in testing sample data between MySQL and PostgreSQL database.
PHP 7.2
MySQL 5.7
PostgreSQL 10.9
I have not checked for other differences beside the example mentioned in the description above.
Since testing data now is done by plugin and not with the SQL scripts, I am a bit confused seeing differences. Or do I understand something wrong? => Ping @Hackwar
Labels |
Added:
J4 Issue
|
It seems there is going something wrong with SQL when inserting sample data.
After I've made a clean install and then installed testing sample data, my tags table looks as follows on MySQL:
On PostgreSQL it looks like this after the same conditions:
So it seems when those tags start with titles "2", "3" and so on, it crashes in PostgreSQL and insterts one last record which looks like part of a column definition e.g. from an SQL error message.
Could be something with data types being wrong.
@alikon Since you worked on the testing sample data stuff regarding PostgreSQL in your PR #25724 : Could you check if there are more errors in these PHP files which you have changed?
Status | New | ⇒ | Discussion |
Afaik only the first 4 tags are correct, the ones with numbers look wrong to me.
If I had to guess, the article model tries to save the ID of the tags as a new tag instead of reference it.
Now after PRs #25752 and #25724 have been merged so other PostgreSQL errors have gone, the issue described here is still valid. Deleting that wrong tag "2" works, assigning multiple of the other tags like e.g. "Red" or "Lime" to an article works, too, creating new tags works, so it seems the problem really comes from the testing sample data plugin.
Meanwhile I know what the reason is for these unwanted tags "2", "3", "4" and "5": The article model expects titles and not ids as reference, so the testing sample data plugin needs a change as long as we don't change the article model. Why creation of the unwanted tags crashed in PostgreSQL is another problem. I am working on a PR to correct the first thing.
Another question is why we don't have unique constraints on such things like the tags title in our database, but that's current standard that we grant it to be unique by the inserting php code and don't have constraints in db.
Hmm, no, does not work. Tags table is ok now, but article does not have tags.
@richard67 should be solved by #25773
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-04 06:15:16 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | alikon |
Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/25747
There shouldn't be a difference since the plugin uses the com_content article model to save the data.
Does assigning multiple tags work on PostgreSQL if you use the regular article form? Because in theory codewise that should be the same.