Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More corrections for schema updates #37

Conversation

richard67
Copy link

@richard67 richard67 commented Aug 11, 2019

Pull Request (PR) for joomla#25570.

Summary of Changes

  1. In the schema update 4.0.0-2019-07-13.sql for PostrgeSQL, some RETURNING id INTO lastmoduleid were missing, see also my previous, closed PR Add some forgotten RETURNING id INTO lastmoduleid to schema update for PostrgeSQL #36 . But meanwhile I've noticed that this RETURNING id INTO lastmoduleid was causing SQL syntax errors anyway. I've replaced that with another method to get the last inserted id by the sequence number, so the RETURNING clauses are not needed anymore.

  2. The records added to the modules table with the schema updates are not consistent with the same records in joomla.sql for new installation.

Testing Instructions

For item 1: Code review, or update staging to a modified 4.0-dev + backend-template on a PostgreSQL database and check with PhpPgAdmin that for each of the new modules there is also a record in the #__modules_menu table (I've tested like that).

For item 2: Code review.

@richard67
Copy link
Author

This corrects some, but it seems there are more errors when updating on PostgreSQL. Trying to sort out what is related to the backend-template.

@richard67
Copy link
Author

I've just noticed another issue but that's not coming from the backend template, the backend template only fell into the same trap as PR joomla#24801 did: They update existing menu items by their id, but on updated systems, especially such with a long update history this will fail. So the 4.0.0-2019-05-05.sql which seems to cause some of the problems I've observed when testing updates with the backend template should be corrected later in 4.0-dev in the CMS.

I'll continue to check the schema updates of the backend template, but my other PR here with changes to joomla.sql could be merged anyway.

@richard67 richard67 changed the title Correct last inserted module id handling in schema update for PostgreSQL More corrections for schema updates Aug 11, 2019
@richard67
Copy link
Author

I think this PR here is ready for merge now. MySQL and PostgreSQL update tests have same result now. There are still issues but I think they are not related to the backend template PR as such.

@richard67
Copy link
Author

Ah, wait, maybe I have more changes for the schema updates.

@richard67
Copy link
Author

Hmm, no, is ok, that was all.

@richard67
Copy link
Author

Both on MySQL and PostgreSQL, the views administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system and administrator/index.php?option=com_cpanel&view=cpanel&dashboard=help are empty after update from staging to modified 4.0-dev update package. After new installation they are not empty. I haven't found the reason for that yet.

@richard67
Copy link
Author

richard67 commented Aug 11, 2019

But I get notices after update when loggin in for the first time after an update:

Notice: Trying to get property 'version' of non-object in /home/richard/lamp/public_html/joomla-cms/administrator/components/com_joomlaupdate/Model/UpdateModel.php on line 1357

7 times.

That's maybe not related to the backend template, have to test further.

@richard67
Copy link
Author

Anyway this PR here can be merged, just reported back issues here for internal discussion beside of the big discussion in the CMS PR.

@richard67
Copy link
Author

richard67 commented Aug 11, 2019

The reason why the help and the system views are empty (see my comment above) could be that for the module mod_submenu the XML file is not found. When I edit such module, I get in the editor a warming alert: "Module XML data not available". Also the module name is - in opposite to the other new modules - not a real name. @bembelimen @wilsonge Any idea what the reason could be? After a new install the module is ok, only after an update there is this problem.

@richard67
Copy link
Author

@bembelimen @wilsonge Guys I have found the reason: The admin module mod_submenu is still in script.php among the old files to be deleted.

@richard67 richard67 mentioned this pull request Aug 11, 2019
@richard67
Copy link
Author

PR for comment above is PR #40

@brianteeman
Copy link

update from staging is not supported at this time.

@richard67
Copy link
Author

@brianteeman This is wrong!! @wilsonge please confirm.

@brianteeman
Copy link

I stand by my statement

@richard67
Copy link
Author

@brianteeman Ask Geogre if you don't believe me. He had merged one PRs to make that work and the backend template breaks this without my changes.

@richard67
Copy link
Author

@brianteeman See my comment here: #40 (comment). Please read and think over.

@wilsonge
Copy link

wilsonge commented Aug 11, 2019

The aim for the next alpha will work upgrading from 3.9.x to j4 loosely (it's not going to be all pixel perfect etc. but the base upgrade should work). That's why I've fixed the sql scripts since the last alpha and regenerated the deleted file checks and got @richard67 to do the db upgrade. If we are creating upgrade files they absolutely should work - obviously right now it's harder to test

@bembelimen bembelimen merged commit a176bba into bembelimen:backend-template Aug 12, 2019
@richard67 richard67 deleted the backend-template-correct-schema-updates-4 branch August 12, 2019 22:46
bembelimen pushed a commit that referenced this pull request Aug 24, 2024
[Cypress] Fix api test for module types site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants