-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fixed blocked dependencies in Project Installer. #4120
Comments
I just had this happen to me with a single level of dependencies, so I don't think that this is limited to nested dependencies... Trying to install the Search API module (which has a dependency on entity_plus): Then once the dependency is downloaded: As you can see, the entity_plus dependency has been downloaded, yet the checkboxes for Search API and Search Views are not available. |
Is it related to the bug that @argiepiano fixed related to three places on dependencies? Just a guess! |
The fix in dependency check (enabling the 3 places check |
I'm always using either latest 1.x freshly cloned from https://github.com/backdrop/backdrop or use demo sandboxes from https://backdropcms.org/demo. So I would say the answer is "latest" 😄 |
...yup. I just double-checked and confirmed the behaviors in my previous comments on:
So the issue seems to be pre-existing (i.e. not caused by #5356) The only apparent difference between the dependencies in search_api vs manualcrop is that the dependency on the former specifies a min version, whereas the latter only specifies module names. |
I've been able to replicate the issue. It only happens when you proceed to the enable step after installation, in the path |
I have found the reason for this problem. In your particular example, @klonos , the expected behavior was for the enable checkboxes for Search API and Search Views to appear, given that the dependency on Entity Plus >=1.0.10 was true. The issue happens in function Function
array(
'name' => 'entity_plus',
'original_version' => '(>=1.x-1.0.10)',
'versions' => array(
array(
'op' => '>=',
'version' => '1.0.10'
),
),
); Especially noteworthy above is
Then the function proceeds to invoke PHP version_compare('1.x-1.0.13', '1.0.10', '>='); This returns false (expected value should have been true as version 1.0.13 > 1.0.10). The issue here is that the first argument included Proposed solution: strip the Backdrop core version out from I'm leaning toward the first option. Should we open a separate issue with this? |
Stripping the Backdrop core version is EXACTLY what's done when building the list of modules in $version_string = preg_replace('/^' . preg_quote(BACKDROP_CORE_COMPATIBILITY, '/') . '-/', '', $files[$requires]->info['version']); in I suggest we use the exact same line before invoking |
Thanks for getting to the bottom of this @argiepiano 🙏🏼 ...you beat me to it 🙂
Well, the original report for this issue reports several problems:
So the answer is "it depends" 😅 ...I have a working solution for point 1 above: backdrop/backdrop#3878 (tested with Ubercart, Search API, and Manual Crop and it works as expected, with the main module being available at the end of the process) |
Well, I ended up stripping the core prefix in /**
* Converts a Backdrop version string into numeric-only version string.
* |
We have been discussing how the version numbers should be shown in the modules list in #5002. I have considered using regex replacement, but after reading https://stackoverflow.com/questions/4517067/remove-a-string-from-the-beginning-of-a-string it seems that using |
Whether substr or regex, it's all the same to me. I was referring to the place and moment where this stripping happens rather than the method. |
Agreed. Please see my reasoning in the reply to your comment in the PR. |
I have tested and works for me. I feel this is RTBC |
Thank you for your feedback @argiepiano 🙏🏼 I have set the |
Requested some changes in the PR. |
Thanks @BWPanda ...both changes made sense, so I committed your suggestions. Ready for review again. |
This looks great, thanks @klonos and @BWPanda, works for me. RTBC |
I don't know what's going on with the labels!! |
By @klonos, @argiepiano, @BWPanda, and @laryn.
By @klonos, @argiepiano, @BWPanda, and @laryn.
The PR at backdrop/backdrop#3878 is great! I love simple fixes to seemingly difficult problems. Thanks @klonos, @argiepiano, @BWPanda, and @laryn! I merged into 1.x and 1.20.x. |
Description of the bug
When a module has a dependency and that dependency has a further dependency, it causes some UX confusion in the Project Installer.
Steps To Reproduce
To reproduce the behavior:
Actual behavior
First it asks in an additional step to download Rules (which Ubercart depends on). Then when we do that, it asks in another separate step to download Entity Plus and Entity UI (which Rules depends on). Then it doesn't allow Ubercart to be enabled:
Expected behavior
Ideally it would download all dependencies in a single step (if that is possible). Then it would be nice to be able to enable the main module (and any dependencies would automatically be enabled/checked when that module was checked).
Related for the last step: Would be nice to see submodules for enabling as well: #2200
The text was updated successfully, but these errors were encountered: