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

Fixing #__assets table #30178

Merged
merged 5 commits into from
Oct 23, 2022
Merged

Conversation

fastslack
Copy link
Contributor

@fastslack fastslack commented Jul 24, 2020

Remove unused com_massmail and added missing assets.

Testing instructions

  1. Install Joomla! as usual
  2. Check if everything works fine.

@richard67
Copy link
Member

  1. Fix for PostgreSQL is missing.
  2. Testing instructions are missing.
  3. Reference to the issue is missing. I assume it's issue [4.0] Remove unused com_massmail component from assets and add missing assets #30179 .

Please add the missing information.

@fastslack fastslack changed the title Fixing #__assets table [4.0] Fixing #__assets table Jul 24, 2020
@fastslack
Copy link
Contributor Author

fastslack commented Jul 24, 2020

Added the PostgreSQL changes and testing instruction

@wilsonge
Copy link
Contributor

Do we need explicit asset entries for all components - I'm only asking because we never seem to have had entries before. So unsure why we need this now. Obviously removing the non-existing component is fine

@ghost
Copy link

ghost commented Sep 12, 2020

Patchtester: After "Apply Patch":

Screenshot_2020-09-12 Joomla Patch Tester - fw40 - Administration

@brianteeman
Copy link
Contributor

@Formatio-hippocampi that is probably because the changes in this PR are in the installation sql files and you have probably mistakenly deleted the installation folder

@richard67
Copy link
Member

@Formatio-hippocampi that is probably because the changes in this PR are in the installation sql files and you have probably mistakenly deleted the installation folder

Or not mistakenly deleted because it is not a Git clone but a "normal" installation, where the folder has to be removed at the end.

But that's the reason, definitely. The installation folder is not there so the Patchtester can't apply changes in the installation SQL script.

@brianteeman
Copy link
Contributor

where the folder has to be removed at the end.

It does not have to be removed with a beta

@drmenzelit drmenzelit added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Dec 2, 2021
@drmenzelit
Copy link
Contributor

@fastslack could you solve the conflicts?

@chmst chmst changed the base branch from 4.0-dev to 4.1-dev January 31, 2022 15:19
@brianteeman
Copy link
Contributor

Is this still relevant? Looks to me like it was addressed by @richard67 in #33924 and can be closed?

@richard67
Copy link
Member

Well the asset for the mass mail component was not removed with my PR.

@brianteeman
Copy link
Contributor

sorry - i confused mailto and massmail

@alikon
Copy link
Contributor

alikon commented Jun 17, 2022

btw this has become obsolete in the meantime as for an example com_csp don't exist
https://github.com/joomla/joomla-cms/pull/30178/files#diff-3a9a51c74db65d66b70dbd56c86e63882cfaa26701ef6ff3f88bd0ea2682bb9fR114

@HLeithner HLeithner changed the base branch from 4.1-dev to 4.2-dev June 27, 2022 13:09
@HLeithner
Copy link
Member

This pull request has automatically rebased to 4.2-dev.

@Quy Quy added PR-4.2-dev and removed PR-4.1-dev labels Jun 27, 2022
@rdeutz rdeutz changed the base branch from 4.2-dev to 4.3-dev October 21, 2022 09:03
@rdeutz rdeutz changed the title [4.0] Fixing #__assets table Fixing #__assets table Oct 21, 2022
@rdeutz
Copy link
Contributor

rdeutz commented Oct 21, 2022

while trying to solve the conflicts I made a list of row we might need to have, positing it here so that it don't get lost:

com_actionlogs
com_admin
com_ajax
com_associations
com_banners
com_banners.category.3
com_cache
com_categories
com_checkin
com_config
com_contact
com_contact.category.4
com_content
com_content.category.2
com_content.state.1
com_content.transition.1
com_content.transition.2
com_content.transition.3
com_content.transition.4
com_content.transition.5
com_content.transition.6
com_content.transition.7
com_content.workflow.1
com_contenthistory
com_cpanel
com_fields
com_finder
com_installer
com_joomlaupdate
com_languages
com_languages.language.1
com_login
com_mails
com_media
com_menus
com_menus.menu.1
com_messages
com_modules
com_modules.module.1
com_modules.module.10
com_modules.module.100
com_modules.module.101
com_modules.module.102
com_modules.module.103
com_modules.module.104
com_modules.module.105
com_modules.module.106
com_modules.module.107
com_modules.module.108
com_modules.module.12
com_modules.module.15
com_modules.module.16
com_modules.module.17
com_modules.module.2
com_modules.module.3
com_modules.module.4
com_modules.module.79
com_modules.module.8
com_modules.module.86
com_modules.module.87
com_modules.module.88
com_modules.module.89
com_modules.module.9
com_modules.module.90
com_modules.module.91
com_modules.module.92
com_modules.module.93
com_modules.module.94
com_modules.module.95
com_modules.module.96
com_modules.module.97
com_modules.module.98
com_modules.module.99
com_newsfeeds
com_newsfeeds.category.5
com_plugins
com_postinstall
com_privacy
com_redirect
com_scheduler
com_tags
com_templates
com_users
com_users.category.7
com_workflow
com_wrapper
root.1

@richard67 richard67 self-assigned this Oct 21, 2022
@richard67
Copy link
Member

While trying to solve the conflicts I found a problem.

The problem with this PR is that it adds some of the missing assets to the top, e.g. 'com_workflow' with id = 2 and so on, so that other assets move down, e.g. 'com_admin' moved from id = 2 to id = 7. But the asset IDs of existing modules are not changed. This cannot be right, and there was no change in the mean time in the base branch which could have caused this.

I could fix that with solving the conflict, but that would be as if I made my own, new PR, so maybe that would be easier.

What this PR does and still needs to be done in the 4.3-dev branch is to remove the obsolete assets for com_massmail and the "User Status" module, and to add the following assets:
com_associations
com_categories
com_fields
com_languages.language.1 (that's the "English (en-GB)" content language)
com_mails'
com_workflow'

The other assets which this PR wants to add have already been added by my PR #33924 (modules 90, 96 to 98, 107, 108)

@richard67
Copy link
Member

richard67 commented Oct 21, 2022

@rdeutz How did you create your list? are you sure we have a "com_newsfeeds.category.5" in a plain new 4.3-dev core installation? Or "com_banners.category.3"? Or "com_contact.category.4"? To me that looks pretty much like the result from a database where sample data was installed, where data is created dynamically with PHP so we definitely cannot and should not provide static asset ids in our base.sql.

Update: hmm wait i could be wrong and they are numbered like that so i got confused

@richard67
Copy link
Member

I've allowed myself to fix the conflicts in a way so it has as little impact as possible on other existing records but the PR still does what it shall do, remove the 2 obsolete assets and add the missing ones (which were complete with respect to @rdeutz 's list).

I've moved the 'com_login' from id=12 to id=13. That could be safely done because there are no child assets of that asset, and that asset id was referenced nowhere, and so I could add the 'com_languages.language.1' asset at the right place regarding alphabetical order.

Adding that asset at this place keeps the changes on lft and rgt values small. They change only up to the values of the removed, obsolete 'User Status' module's asset, after that they remain the same for other modules' assets.

For the same reasons I have reused the asset id of the obsolete 'com_massmail' to add the missing 'com_mails' asset.

The remaining missing assets have been added to the end of the tree, i.e. after so 'com_scheduler', so only the rgt value of the root asset needs to be updated to that.

The PR should be tested by review by people who understand the nested table structure.

@rdeutz rdeutz removed the PR-4.2-dev label Oct 21, 2022
@richard67 richard67 removed Conflicting Files Updates Requested Indicates that this pull request needs an update from the author and should not be tested. labels Oct 21, 2022
@bembelimen bembelimen merged commit 2f1ea73 into joomla:4.3-dev Oct 23, 2022
@bembelimen
Copy link
Contributor

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet