Closed (duplicate)
Project:
Drupal core
Version:
10.1.x-dev
Component:
extension system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Apr 2015 at 06:10 UTC
Updated:
21 Mar 2023 at 10:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lauriiiThat is definitely related to this. Should we even mark it as a duplicate for this?
Comment #2
berdirHaving a module and a theme with the same name is not supported and will result in a completely broken site.
http://drupal.stackexchange.com/questions/152809/install-a-custom-empty-...
Instead of trying to do something about that here, we should just check for that and prevent that from happening in the first place.
Comment #3
dawehnerRight, both the theme installer and the module installer could check whether there is some other extensions with the same name available and throw an exception or something else, in case that happens.
Comment #4
jibran+1 for #3
Comment #5
berdirYes, lets change it to that then.
Comment #6
cilefen commentedComment #7
cilefen commentedComment #8
cilefen commentedComment #9
cilefen commentedComment #10
cilefen commentedI added a test on the ThemeInstaller. We will need a test of the module installer.
Comment #12
joshi.rohit100And
---
Doesn't it look like we are duplicating samething (I know that its one for theme and another for module) ?
Comment #13
cilefen commentedWe may want to implement a trait or something.
Comment #14
jibranI don't think it's worth it as long as we have tests to cover both the cases.
Comment #15
cilefen commented#371375: Do not allow a module and theme to use the same name.
#2375731: update_fix_compatibility() doesn't respect theme/module naming collisions
Comment #16
heddnJust to note, the fix on D7 is being worked on under #2375731: update_fix_compatibility() doesn't respect theme/module naming collisions.
Comment #18
stefan.r commentedTests seem to fatal on testClassLoading, re-triggering testbot.
Comment #25
andypostComment #26
andypostneeds reroll & fix
Better to use @expectedException
Comment #28
Adev22 commentedRerolled and fix the patch #26 but without test
Comment #29
mparker17@adev apparently the patch in #28 is failing with the error
core/modules/system/src/Tests/Extension/ThemeInstallerTest.php: No such file or directory... it's possible that test was moved between 8.8.x and 8.9.x.git log --follow -- 'core/modules/system/src/Tests/Extension/ThemeInstallerTest.php'might help track down what happened to it.Your patch also includes several older patch files from this issue, which aren't necessary to include. If you're interested, I wrote my best practices for generating patches and interdiffs a few years back: I apologize in advance for its verbosity, but I still refer to it when writing patches myself.
Comment #30
lulzsec commentedTrying to fix #28
Comment #32
hardik_patel_12 commentedRe-roll for 9.1.x-dev
Comment #33
jofitzReturned to #10 to re-roll for D9.1.x
Returning to Needs Work to address comments in #26.
Comment #34
jofitzReturning to Needs Work to address comments in #26.
Comment #35
jofitz* Address comments in #26.
* Fixed coding standards violations highlighted in #33.
Comment #38
danflanagan8The current work on this issue is very much a duplicate of the work on #371375: Do not allow a module and theme to use the same name.. I'm new to both of these issues so I don't feel comfortable closing either of them.
I prefer the exception message on the other issue and I prefer the tests on the other issue.
Another difference in the patches is the location of the code block that checks for duplicates. In this issue the code block is near the beginning of the
installfunction. In the other issue the code block is closer to the end of theinstallfunction. Not sure if that matters to anyone.Neither issue appears to deal with profiles at this point.
Comment #42
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #43
Akhil Yadav commentedAdded patch against #35 in 10.1 version
Comment #44
bhanu951 commentedSetting as need review for tests to run.
@Akhil Yadav Once you have uploaded the re-rolled patch, change the status to Need Review so the test-bot runs tests against the patch.
Comment #45
bhanu951 commentedMissing core/lib/Drupal/Core/Extension/ExtensionDuplicateNameException.php
in the patch #43 present in #35 . Hiding patch #43.
Comment #46
sahil.goyal commented#35 still applies to 10.1.x
Comment #47
acbramley commentedClosing this as a duplicate of #371375: Do not allow a module and theme to use the same name. there is a (at least at one point) green patch there with test coverage for both cases (module and theme)
I also can't see any code in this issues patch regarding profiles so maybe another issue should be opened just for that.
Triaged as part of Bug smash