
I have a strange issue on a site I am working on. This morning I went to do a composer install and got the following error.:
- Installing drupal/blog (dev-2.x 1830b99): Cloning 1830b9954b from cache
- Applying patches for drupal/blog
https://www.drupal.org/files/issues/blog-no_results_text-2834732-2.patch (Enter drupal/blog patch #2834732 description here)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/blog-no_results_text-2834732-2.patch
[Exception]
Cannot apply patch Enter drupal/blog patch #2834732 description here (https://www.drupal.org/files/issues/blog-no_results_text-2834732-2.patch)!
Looks like drupal/blog was updated and the below patch is now included in the module. However, it's strange since drupal/blog is tagged to a specific commit (43a2171) in wxt. However, when I do my site (based off wxt) it is pulling the latest (1830b9954b). It appears like the "upstream" (from wxt) requirement isn't being followed and it is pulling the latest.
Here is the blog issue with comment that it's now in the module https://www.drupal.org/project/blog/issues/2834732#comment-13534423
In my site composer.json I added a the require entry for the blog (the same as in wxt) and it seems to be working.
I am wondering if I need to mimic all "hard tags" in the highest level composer...
Comments
Comment #2
natew CreditAttribution: natew as a volunteer commentedIt appears from the following composer docs that tagging to git hash isn't really recommended or supported. It also isn't followed if it isn't in the root composer file.
from https://getcomposer.org/doc/04-schema.md#package-links
I am wondering if we can get the blog module to tag a release and we can then pin this in wxt and not have to replicate it in sites that require wxt.
Edit to add.: here is a link to composer docs that also say tagging to a hash isn't really recommended.
Comment #3
joseph.olstadyes we have stumbled on this as well.
Comment #4
joseph.olstadSomeone please ping the blog module maintainers and pester them until they release a tagged release, that is what I normally do,
if they refuse, then I usually try to become maintainer going through the project ownership process, usually something happens along the way or someone wakes up.
Comment #5
joseph.olstadComment #6
d8simon CreditAttribution: d8simon commentedWould you be able share what you had to add?
Comment #7
joseph.olstadok I looked into this a bit more, I think what @natew is trying to say is something like this:
Comment #8
joseph.olstadHmm, that didn't work, still looking at this.
Comment #9
joseph.olstadok, so the above workarounds didn't work for us, so instead we added our last known working composer.lock file to our repository, removed the git ignore on the composer.lock, now "composer install" is working again but not composer up
Comment #10
natew CreditAttribution: natew as a volunteer commented@joseph that seems to be what I did, here is the exact commit.: https://github.com/StatCan/site-ccei/commit/756abedffd9a4512aa96f8196b58...
Note that this has to be at the "highest" level composer.json file. In our case it's at the site (not the profile). You could probably get away with patch ignoring this also. Which I think I may have tried and didn't quite work.
Edit to add, looks like we got a blog tag on April 3rd! https://www.drupal.org/project/blog/releases/8.x-2.0-beta1
Comment #11
joseph.olstadhmm, your composer.json looks very similar to ours
however I noticed that you put this as the last entry
I might have had to flush the composer cache to get this to 'kick in' , I'll try again when I get a chance,
Thanks,
Comment #12
natew CreditAttribution: natew as a volunteer commentedShould be fixed in 3.0.9
https://github.com/drupalwxt/wxt/commit/93544b86c1fbb6358c4028a86be64fb1...
Edit to add if you want to see this working in the CI for the ccei (the previous github commit I sent) see.: https://travis-ci.org/github/StatCan/site-ccei/builds/670223555
Comment #14
joseph.olstadThanks @natew!
Comment #15
joseph.olstad@natew
make sure to update this as well:
https://github.com/drupalwxt/wxt-project/commits/8.x
Comment #16
natew CreditAttribution: natew as a volunteer commented@joseph.oldstad What do I need to change in wxt-project? I see no mention of blog in that code base (i git cloned and grepped).
Comment #17
joseph.olstadsee this line of code
https://github.com/drupalwxt/wxt-project/blob/3c6676d7d81f673105add4c14c...
When you update wxt you must also update wxt-project
Comment #18
natew CreditAttribution: natew as a volunteer commentedI haven't tagged a 3.0.9, was going to wait till we get more into this release (fixes, features, testing). Minimally, I would wait till security updates get released today (if there is any that apply to us). This isn't really a show stopper and doesn't require a release for one fix.
Comment #19
joseph.olstadah ok , makes sense
hmm, 3.0.9 looks like it will have a lot of disruptive changes with media_entity being removed along with other modules. So the slideshow is going to be destroyed then, we're using the slideshow and have some slideshow images. What is replacing media_entity? Is there an upgrade path for slideshow? If not, can we just delete our slideshow images and create a new slideshow with whatever will be replacing it?
last release we noticed issues when the admin_toolbar_search module was removed and it took a while to figure out what was going on.
Comment #20
joseph.olstadwe're still in development phase so won't mind deleting the slideshow and re-creating it provided that there's something to replace it with.
Comment #21
natew CreditAttribution: natew as a volunteer commentedjoseph.olstad lets discuss the removal of media_entity in this issue please.
Comment #22
joseph.olstadI updated to the latest wxt dev following the steps outlined here: #3120601: upgrading using the wxt-project composer.json
seemed to work correctly.
Comment #23
joseph.olstadI'm answering support requests about this due to 3.0.9 not being tagged yet some people (other than us) are also getting tripped up on this.
Since the standard installation procedure is currently broken with any version other than dev, would it be possible to please publish/tag a release 3.0.9?
Comment #24
natew CreditAttribution: natew as a volunteer commentedI am not sure when we are planning and doing a new release. However, I would point out that there is a work around to this issue, which is to pin the drupal/blog module in the composer.json you run composer on. This would then have to be removed when you move to the next release. Which is pretty typical in the drupal world . Note this is also not a problem if you use the github tarball, not sure if people are even using that. :P
Comment #26
jenniferhoude CreditAttribution: jenniferhoude commentedTried to install this distribution with the new update but still getting the error regarding the blog patch.
"Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/blog-no_results_text-2834732-2.patch
[Exception]
Cannot apply patch Enter drupal/blog patch #2834732 description here (https://www.drupal.org/files/issues/blog-no_results_text-2834732-2.p
atch)! ."
Comment #27
natew CreditAttribution: natew as a volunteer commented@jenniferaube can you provide more detail please? I have updated 2 sites based on the distro (wxt) and I am not seeing this issue (going to 3.0.10 in composer.json). You can see this in our CI for one of the projects in the composer install here . It is installing https://ftp.drupal.org/files/projects/blog-8.x-2.0-beta1.zip with no patches as expected. Not sure how/why you are seeing the patch still? What version are you using?