These functions have been deprecated since Drupal 8.7.0 and need to be replaced as detailed in:
https://www.drupal.org/node/3006851
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | interdiff_27_37.txt | 1.62 KB | devad |
| #37 | 3093483-37.patch | 7.09 KB | devad |
| #28 | Interdiff_12_27.txt | 578 bytes | devad |
| #27 | 3093483-27.patch | 6.48 KB | devad |
| #12 | 3093483-12.patch | 5.83 KB | devad |
Comments
Comment #2
devad commentedAfter applying automated Rector patch #2 from #3130934: Drupal 9 Compatibility here is the rest of Upgrade Status module report for Ludwig 8.x-1.0
Comment #3
devad commentedThis patch includes automated Rector patch #2 from #3130934: Drupal 9 Compatibility and core_version_requirement for D9.
It fixes two Upgrade Status errors listed at comment #2 also.
Comment #4
devad commentedFailing again with d9.1.
Comment #5
bojanz commentedLet's call this $moduleExtensionList (and $module_extension_list in __construct()), it reads better. Core uses both, no clue why.
The Drupal 9.1 failure looks unrelated to the module. If it doesn't pass on its own, you might need to ping someone on Slack.
Comment #6
devad commentedImplemented suggestion #5.
Plus trying to code-copy similar core patches.
And at the end fixing 4 coding standards messages from test #4 results.
Comment #7
devad commentedInterdiff almost as big as patch itself. :)
Regarding D9 tests failure I have created a core issue:
#3171932: Ludwig module Tests issue: Conclusion: don't install drupal/core 9.1.x-dev
Maybe somebody will reply what's wrong with D9 tests.
Comment #8
spokje@devad: In reply to your question here:
core: 8.xfromludwig.info.ymlcontainer_commandindrupalci.yamlas in the example here: https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-tes...Comment #9
devad commentedThank you @Spokje.
@bojanz
Since D8 tests are fine, and D9 tests fail because of current
ludwig.info.ymlfile content... I suggest that we continue with "Needs review" here... if you agree of course.I have tested patch #6 manually and it works fine for me both in D8 and D9 environments.
More manual tests are welcome...
Comment #10
bojanz commented@devad
Okay. Waiting on RTBC to commit. I'd also happily give you co-maintainership if you want to continue driving this forward.
Comment #11
devad commentedRE: I'd also happily give you co-maintainership if you want to continue driving this forward.
OK. I can try.
It will be my first module to co-maintain though, so I will need some help probably.
I hope there are some handy tutorials around to help new Drupal co-maintainers. :)
Comment #12
devad commentedFixing the unintentional character-delete change and adding one-line patch from (#3003869) to avoid git merging during commit.
Comment #13
devad commentedinterdiff
Comment #14
bojanz commented@devad
You have access now.
Comment #15
devad commentedThanks @bojanz.
Comment #16
cjsmith87 commentedI am trying to apply #12 patch to ludwig-8.x-1.x-dev. I have downloaded ludwig-8.x-1.x-dev and unzipped, Downloaded the patch and put it in the root of the module and ran "git apply 3093483-6.patch" but i get the following error:
error: patch failed: ludwig.info.yml:1
error: ludwig.info.yml: patch does not apply
Comment #17
cjsmith87 commentedOk so I edited the info.yml file manually and then the other changes applied correctly but now I get this error message on my site when going to update.php:
[01-Oct-2020 12:14:57 Europe/London] Error: Call to a member function getParameter() on null in /home/mywebsite.com/core/lib/Drupal/Core/AppRootFactory.php on line 34 #0 /home/mywebsite.com/vendor/symfony/dependency-injection/ContainerBuilder.php(1132): Drupal\Core\AppRootFactory->get()
#1 /home/mywebsite.com/vendor/symfony/dependency-injection/ContainerBuilder.php(618): Symfony\Component\DependencyInjection\ContainerBuilder->createService(Object(Symfony\Component\DependencyInjection\Definition), Array, true, 'app.root')
#2 /home/mywebsite.com/vendor/symfony/dependency-injection/ContainerBuilder.php(558): Symfony\Component\DependencyInjection\ContainerBuilder->doGet('app.root', 1)
#3 /home/mywebsite.com/modules/ludwig/src/LudwigServiceProvider.php(20): Symfony\Component\DependencyInjection\ContainerBuilder->get('app.root')
#4 /home/mywebsite.com/core/lib/Drupal/Core/DrupalKernel.php(1266): Drupal\ludwig\LudwigServiceProvider->register(Object(Drupal\Core\DependencyInjection\ContainerBuilder))
#5 /home/mywebsite.com/core/lib/Drupal/Core/DrupalKernel.php(897): Drupal\Core\DrupalKernel->compileContainer()
#6 /home/mywebsite.com/core/lib/Drupal/Core/Update/UpdateKernel.php(41): Drupal\Core\DrupalKernel->initializeContainer()
#7 /home/mywebsite.com/core/lib/Drupal/Core/DrupalKernel.php(470): Drupal\Core\Update\UpdateKernel->initializeContainer()
#8 /home/mywebsite.com/core/lib/Drupal/Core/Update/UpdateKernel.php(64): Drupal\Core\DrupalKernel->boot()
#9 /home/mywebsite.com/update.php(28): Drupal\Core\Update\UpdateKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#10 {main}
Comment #18
devad commentedRe: @cjsmith87 comment #16
You said that you downloaded patch #12 but your git apply command is for patch #6.
Patch #6 had typo in code, and therefore patch 12 is released. See interdiff.
Can you apply patch #12 and reply if you have any issues with it?
It applies cleanly to testbot (just retested). So, it should apply cleanly to you as well.
This may help: If you are on Windows system, to avoid problems with git apply errors do not copy/paste patch text into your text editor and save. Rather right-click the patch in your browser, select "Save link as" and save it to your ludwig's folder directly.
Comment #19
devad commentedComment #20
devad commentedIt seems that the issue below is not connected with D9 deprications, but it is a must-fix before D9 release since it affects Ludwig + D9 environments. Since is not reproducible at Ludwig + D8 environment it could be a Drupal Core bug/issue as well which we need to find a fix around.
#3153424: [D9] Error: Call to a member function getParameter() on null
Some help there would be appreciated...
Changing title of this issue to address all D9 deprications. If you find more deprications, just post here.
Comment #21
pbhuktar7 commentedludwig #12 worked perfectly on D9.07 for me
also consider to add test patch
Comment #22
devad commented@pbhuktar7
Thnx for review.
I have created a new issue for your tests: #3176547: Add more Ludwig tests.
Please, feel free to upload your tests patch there so that it can be properly tested by Drupal automated tests.
Comment #23
devad commentedGood news. The last Ludwig D9 release blocking issue #3153424: [D9] Error: Call to a member function getParameter() on null has a patch now as well.
Comment #24
pbhuktar7 commentedre @devad #22
There was error like this, while installing of Address Library
it give error like
#3153424: [D9] Error: Call to a member function getParameter() on null
so i followed This issue, also added suitable library definitions to address field. without removing ludwig,, in previous cases after dependency resolve my big mistake i removed ludwig module.
my json library defination :
Comment #25
pbhuktar7 commentedComment #26
devad commentedMarking RTBC as per #21
Comment #27
devad commentedAdding fix for #3153424: [D9] Error: Call to a member function getParameter() on null to patch #12 so that it can be properly tested with D9.
Comment #28
devad commentedOne line interdiff.
Comment #29
devad commentedPatch #27 needs review again since it is now supposed to fix both our issue and this issue as well: #3153424: [D9] Error: Call to a member function getParameter() on null.
Re: #24 @pbhuktar7
You can use patch #27 from here and patch #5 from: #3126733-5: doctrine/collections missing when using Ludwig on D9 together.
It should work for you to install Address module + D9 properly with Ludwig.
Comment #30
deixadilson commentedI did the same thing as cjsmith87 did with patch 27:
"I have downloaded 8.x-1.0 and unzipped, Downloaded the patch 27 and put it in the root of the module and ran "git apply 3093483-27.patch" but i get the following error:
error: patch failed: ludwig.info.yml:1
error: ludwig.info.yml: patch does not apply
Ok so I edited the info.yml file manually and then the other changes applied correctly"
Then I went to try and install drupal commerce in D9 with ludwig. I put the dependencies (commerceguys/addressing and commerceguys/intl) in their places. Their statuses went "installed" in Ludwig's Packages screen. But when I tried to activate drupal commerce module I still got "Address requires the commerceguys/addressing library." error
Comment #31
deixadilson commentedSince i couldn't make d9 work with drupal commerce. I installed d8 and did the same thing. and the same thing happened.
statuses are "installed" in Ludwig's Packages screen. But when I try to activate drupal commerce module I still got "Address requires the commerceguys/addressing library." error
Comment #32
devad commentedRe: @deixadilson #30, #31
Are you using Composer or tarball to install Drupal Core?
Comment #33
deixadilson commentedRe: devad #32
Tarball
Comment #34
devad commentedRe: @deixadilson #30, #31
Did you try to clear cache after you have downloaded and unpacked library into proper folder structure?
Reports > Packages report will show your library as "Installed" even without cache clear, but enabling the module will not work if you do not clear the cache after the library is unpacked.
Comment #35
deixadilson commentedIt worked after clearing the cache in D9. Sorry for that.
Comment #36
devad commentedRe: #35. Good that you have posted your issue. I have learned from it.
Regarding your problems with patch not applying... it is normal since drupal.org is adding few extra lines to info.yml files when project is downloaded as tarball. To apply patch without such problems git clone + git apply is needed.
The last thing, but important for your D9 + Address module configuration: You are going to need patch #5 from #3126733-5: doctrine/collections missing when using Ludwig on D9 for Address module to work nicely with D9.
Comment #37
devad commentedOne more D9 deprecation error with
drush ludwig-downloadcommand:ArgumentCountError: Too few arguments to function Drupal\Core\FileTransfer\Local::__construct(), 1 passed in D:\wamp\www\d9ludwig\modules\ludwig\src\PackageDownloader.php on line 100 and exactly 2 expected in Drupal\Core\FileTransfer\Local->__construct() (line 25 of D:\wamp\www\d9ludwig\core\lib\Drupal\Core\FileTransfer\Local.php).New patch attached. It should fix the Drupal Console
ludwig:downloadcommand automatically also.Comment #38
devad commentedInterdiff.
Comment #39
devad commentedComment #41
devad commentedThanks to all. Committed to 8.x-1.x-dev.
Comment #43
ladybug_3777 commentedI'm not sure what I may be missing, but I'm not able to use this module on my Drupal 9.2.4 installation.
I've tried version 1.8 and dev but both give me the following error when I try to view the config page:
Is there something else I need to do to get this working?
Comment #44
devad commentedI can not reproduce this error on clean D9.2.4 installation.
Can you reproduce this error on clean D9.2.4 installation @ladybug_3777?
If yes, can you post the exact steps how to reproduce the error.
And please send us more data about your configuration:
Also, do you have any other log errors appearing close to this one?
Comment #45
mmjvb commentedLooks like this happens when you don't use composer to install.
That is how I reproduced it. No classes available. The module depends on composer to make it work.
Comment #46
devad commentedCan you please post the exact steps to reproduce post #43 error @mmjvb.
I have done:
1. Installing D9.2.4 from tarball (without composer).
2. Installing Ludwig 1.8 from tarball (without composer as well).
And everything works fine at my local environment with php7.3.12
Comment #47
mmjvb commentedCopied the composer installed ludwig one higher, uninstall from site and remove code. Then enable using GUI.
Realized I should have cleared cache. So, repeated the proces with drush cr. Now it does work.
Sorry, no longer reproducible.
EDIT Actually, it is. Didn't have my coffee yet. Forgot to remove composer installed ludwig after which a cache rebuild is done. And reproduced the issue!
Comment #48
devad commentedThank you @mmjvb, but your post didn't help me enough. I need a simple steps to reproduce still. Like 1, 2, 3...
BTW... Ludwig is the manual alternative for Composer. Installing D9 + Ludwig with Composer does not make a lot of sense. Drupal users familiar with Composer do not need Ludwig and they shouldn't use it.
Comment #49
mmjvb commentedIt really doesn't get simpler than what I described.
So, just confirming that it doesn't work when manually installed. It works when installed with composer!
Agree that you should not need to install it with composer. But, now you need to, otherwise it doesn't work.
Started to require classes in ludwig.module, but there are just too many, so gave up.
EDIT No idea why it wouldn't work. Created a new environment with 9.2.4, installed Ludwig with the tar.gz, enabled it, no problem. Copied smtp from other environment. No problem, shows as installed.
Comment #50
devad commentedAs I said previously... if I follow simple basic installation steps described in my post #46 I can not reproduce the error.
If someone can post here similar 1, 2, 3... steps which can produce this error with clean Drupal 9.2.4 installation it would be helpful.
Comment #51
mmjvb commented@ladybug_3777 My problem was having used composer for Ludwig. In addition to clearing cache you might need `composer dump` to really get rid of outdated configuration. Doesn't look like an issue with Ludwig, just happens to be the project involved, could have been any project.
Comment #52
ladybug_3777 commentedThe issue ended up being a problem with directory syncing on my installation that was using docker. It wasn't properly copying the files from my Vendor folder over to my docker environment. Took me a while to track this down, but glad to report it's not the module that had the problem.
Comment #53
devad commentedThank you for reporting back @ladybug_3777.