Problem/Motivation
Also note this:
There are cases the upgrade in #37 doesn't catch:
+-----+----------+--------+----------+
| pid | source | alias | langcode |
+-----+----------+--------+----------+
| 1 | /node/1 | /test1 | en |
| 2 | /node/2 | /biii | en |
| 3 | //node/1 | /bar | en |
+-----+----------+--------+----------+
3 rows in set (0.00 sec)
1. Adds forward slash to a source that already has a forward slash.
2. If we fixed #1, we'd additionally have to de-duplicate the /node/1 source when the alias is the same - although apparently the url_alias table has no unique key, so you can have 100% duplicate aliases and that wouldn't fatal at least.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#17 | beta2beta-update-2509300--2511962-17.patch | 9.16 KB | jhedstrom |
Comments
Comment #1
dawehnerExtracting the existing tests from the other issue
Comment #2
dawehnerComment #3
jibranComment #5
effulgentsia CreditAttribution: effulgentsia at Acquia commentedComment #6
jhedstromTests are failing since this should be
alias
rather thandestination
.Comment #7
jhedstromHere's the start of moving #1 to beta2beta. The tests won't pass because the module is refusing to run the updates since Beta 12 isn't out yet. Will probably have to rework that logic in order to make these testable.
Comment #8
googletorp CreditAttribution: googletorp as a volunteer commentedComment #9
jhedstromThese tests go green if run from
8.0.0-beta12
. I think we should perhaps add a way for tests to run from the latest 8.0.x if #2514858: Enable automated tests for this module is to work correctly.Comment #10
Corregidor CreditAttribution: Corregidor commentedI believe there is a mistake in the sqlite case. Also, reword to prepend instead of append:
Comment #11
tancAlso anywhere a path has been specified in block visibility settings it will need updating to add the slash. At least it seems this way from my limited testing.
Comment #12
jhedstromThis addresses #10.
This current patch combined with #2527818: Provide beta11 to beta12 test has everything working as expected. It does not provide an update hook for #11 though.
This patch also removes the config schema, which was added in #2528402: Config schema is missing.
Comment #14
jhedstromThis adds an update hook (and test) for the block visibility settings noted in #11.
I've updated these tests to use the new base class introduced in #2527818: Provide beta11 to beta12 test. Note these tests won't pass until core issue #2527816: Logic error in SqlContentEntityStorage::countFieldData() attempts to drop `name` column is committed, but they are passing locally for me with that patch applied.
Comment #16
BerdirIn #2528178: Provide an upgrade path for blocks context IDs #2354889 (context manager), we explicitly work with config objects directly to avoid hooks and so on as much as possible. Might be a good idea here as well.
Comment #17
jhedstromI've updated the tests to use more direct db insert/update statements as suggested in #16. I've also consolidated all of the tests for this update hook into one test class.
Comment #20
jhedstromAssuming the testbot one day decides to run this test and it goes green, are there any objections to the current update hooks in this patch? I think they address all concerns mentioned above at this point.
Comment #21
BerdirLooks fine to me. Let's get it in, we can still fix bugs in follow-ups or extend it. I'll likely start testing this on real sites soon, thanks so much for all your work on this. Very appreciated.
Comment #23
jhedstromCommitted #17.
Comment #25
jhedstromlol, it decided to run them immediately after I'd committed the patch :)
Tests are green in other issues now.