When I look at the installation sql I see that for any table that has an asset_id field any records have a value for asset_id
But for guided tours the asset_id for all the tours have the same value of 0
Labels |
Added:
No Code Attached Yet
|
@richard67 both of those are examples where there is only one record.
Table #__categories
joomla-cms/installation/sql/mysql/supports.sql
Lines 66 to 72 in b7f4ddf
Table #__modules
joomla-cms/installation/sql/mysql/base.sql
Lines 600 to 636 in b7f4ddf
Table #__workflows
joomla-cms/installation/sql/mysql/base.sql
Lines 1125 to 1126 in b7f4ddf
Table #__workflow_stages
joomla-cms/installation/sql/mysql/base.sql
Lines 1174 to 1175 in b7f4ddf
Table #__workflow_tramsitions
joomla-cms/installation/sql/mysql/base.sql
Lines 1209 to 1216 in b7f4ddf
That does not mean that I think it is right here for the guided tours. In fact I don't know. I just wanted to point to the places where we already do that.
I don't know either - just pointing it out for someone with more knowledge to decide to either fix or close
@brianteeman I know the other examples. Before we can decide for the right asset IDs here for the guided tours I think it needs to solve the other issue #40199 . The reason is that when we update we do not add new assets anyway, so we have to rely on the PHP doing it right and adding them to the right parent. I have too little knowledge on where that happens.
agreed that 40199 needs to be fixed first
@brianteeman I've pinged the maintainers in their Mattermost channel. I hope it can be clarified and fixed. With the latter I would help of course when I know how the assets shall be structured and named.
@richard67 thanks - fixing assets after a release will be very hard
As far as I understand, tours are not saved into the asset table until permissions are modified. The asset id is properly set in the guidedtours table once the tour has been saved once. So, I believe this is ok, but this needs to be confirmed.
I think it will work as it is, but as pointed out by @brianteeman it’s not consistent with what we do almost everywhere else, so I think I will make a PR for proper assets on new installation in the next days.
addressed elsewhere
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-01 18:03:33 |
Closed_By | ⇒ | brianteeman |
@brianteeman That's not really right. We have two places where we insert one or more records into a table which has a column "asset_id" and we use a zero value (or not use the column in the insert so the default of zero will be used).
#__languages
: Here we insert the one record for the default language without specifying the asset_id, so the default of zero will be used. https://github.com/joomla/joomla-cms/blob/4.3-dev/installation/sql/mysql/base.sql#L446-L447#__menu_types
: Here we use zero as asset_id for the one record for the main site menu. https://github.com/joomla/joomla-cms/blob/4.3-dev/installation/sql/mysql/base.sql#L562-L563That does not mean that I think it is right here for the guided tours. In fact I don't know. I just wanted to point to the places where we already do that.