User tests: Successful: Unsuccessful:
Pull Request for Issue #21073 .
Adds a table check prior to storing.
Create the blog sampledata and check the menutype of the created menus.
They should contain no spaces and be lowercased.
Contain spaces and uppercase characters
None
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests Repository Administration com_admin SQL Postgresql MS SQL com_associations com_banners |
Better now :)
I have tested this item
There is an error in the sample data plugins. Response is invalid.
Note that the multilingual sample plugin does not have this problem. menus are created correctly there
Labels |
Added:
?
|
Category | Unit Tests Repository Administration com_admin SQL Postgresql MS SQL com_associations com_banners | ⇒ | Front End Plugins |
I don't know why you got an invalid response. It works for me fine.
One reason may be that the check did return false, and since my code didn't test it may have triggered some unhandled error somewhere. I've changed now the code so it checks for exceptions and return values. Which was also the main difference to the multilingual code.
the invalid response was me checking it in j4 not staging
the pr works correctly in j3
I have tested this item
Ah, that explains it :)
While testing, I found another possible issue:
we have
'title' => JText::_('PLG_SAMPLEDATA_BLOG_SAMPLEDATA_MENUS_MENU_' . $i . '_TITLE') . $langSuffix,
and
$type = JHtml::_('string.truncate', $menu['title'], 23, true, false);
If the title is the same in 2 or more languages and truncate takes off the lang code , the menu type maybe exactly the same.
Afaik, it is forbidden to create multiple menus with the same Menu Type value.
EDIT: also, a Menu can have the same title but not the same menu type, which is bizarre as it is the title which is displayed in the Select Menu dropdown field.
What do you think?
a Menu can have the same title but not the same menu type,
This is a general behavior, unrelated to this PR.
If the title is the same in 2 or more languages and truncate takes off the lang code , the menu type maybe exactly the same.
I doubt the changes for that happening is great, but yes it may happen if the languages are close enough or didn't translate the english text.
But we're talking about a blog sampledata here. I don't think the case were you install the same sampledata for multiple close or non-translated language packs is often. If you install it for german, french and italian and all of those packs have the sampledata translated, then it will work fine
Hmm. I have not tested in German, but I should with de-DE, de-AT, etc. to see what happens
you can resolve this in the plugin by truncating the title first and then adding the language code
you can resolve this in the plugin by truncating the title first and then adding the language code
Would be an option, yes. However I really doubt we run into that issue anytime. Keep in mind that
For the blog sample data, I don't even see a title that may get longer than 23 characters even in german
But yeah, if someone wants to have a take at it, go ahead.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Similar patch for 4.0 ?
Similar patch for 4.0 ?
George will merge staging up to 4.0. If something is needed afterwards, we will do that.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-13 07:58:06 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
?
Removed: ? |
Thanks.
Oops