Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Basically block_custom_block_save expects $body to be an array with keys 'value' and 'format', we pass it a string so we end up with just the first character of the previous block body.
Test to verify fail.
Then a fix.
Comment | File | Size | Author |
---|---|---|---|
#3 | linkchecker.block-tests.patch | 2.44 KB | larowlan |
linkchecker.pass_.patch | 3.2 KB | larowlan | |
linkchecker.fail_.patch | 2.35 KB | larowlan | |
Comments
Comment #2
hass CreditAttribution: hass commentedWhat link checker version are you using? Your patch looks not correct. Have you seen
linkchecker_block_custom_block_get()
?Comment #3
larowlanYep, looks like the issue has been fixed in the dev branch, I had the 7.x-1.0-beta1, apologies.
Regardless the attached patch adds extra test coverage.
Comment #4
larowlanComment #5
hass CreditAttribution: hass commentedbeta1 is very old and has some issues... This was fixed before 1.0 final. Please use latest version only.
Thanks for these tests!
Comment #6
hass CreditAttribution: hass commentedI see some issues with this test. The main problem here is that the test rely on googles today behaivior. This is a real life test, but this is not reliable on the other side if something change at google. I'm strongly for faking the status code and manually do the tests.
The test here is a good starting point for #1917188: Write tests for status code handling and auto update.
Comment #7
hass CreditAttribution: hass commentedAside, do we have a hook_block_update/insert/delete now in D8?
Comment #8
VladimirAusTask was updated more than 9 years ago. 🏰
Marking as outdated.
Please update description and info if it is still valid.