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

[4.4] Fix finder helper addContentType duplicate entry for key 'title' #43053

Merged
merged 4 commits into from
May 20, 2024

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented Mar 16, 2024

Pull Request for Issue # .

Summary of Changes

When Finder helper trying to add a new content type it ignores already added types.
This leads to duplicated entry error.

Testing Instructions

Run following code anywhere:

$name = uniqid(); // Imitating a new content type name, can be any string
var_dump(Joomla\Component\Finder\Administrator\Indexer\Helper::addContentType($name, ''));
var_dump(Joomla\Component\Finder\Administrator\Indexer\Helper::addContentType($name, ''));

Actual result BEFORE applying this Pull Request

An error Duplicate entry 'xxxxx' for key 'xxxx.title'

Expected result AFTER applying this Pull Request

No error, the method return the same ID

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

@exlemor
Copy link

exlemor commented Apr 21, 2024

I have tested this item ✅ successfully on 7b1dfd4

@Fedik, I have successfully tested this in Joomla 4.4.4 (as well as Joomla 5.1.0 as well)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43053.

@HLeithner HLeithner changed the title Fix finder helper addContentType duplicate entry for key 'title' [4.4] Fix finder helper addContentType duplicate entry for key 'title' Apr 24, 2024
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 7b1dfd4


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43053.

@alikon
Copy link
Contributor

alikon commented May 18, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43053.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 18, 2024
@MacJoom MacJoom self-assigned this May 20, 2024
@MacJoom MacJoom modified the milestone: Joomla! 4.4.5 May 20, 2024
@MacJoom MacJoom merged commit 500cce3 into joomla:4.4-dev May 20, 2024
3 checks passed
@MacJoom MacJoom added this to the Joomla! 4.4.5 milestone May 20, 2024
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 20, 2024
@Fedik Fedik deleted the finder-fix-duplicatekey2 branch May 21, 2024 06:40
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.

6 participants