Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Continuing from https://www.drupal.org/project/drupal/issues/2951715#comment-12559059
When there is no php or request_path specified in the visibilty configuration, block_visibility plugin skips that particular row, But currently there is no where these exception get logged.
core/modules/block/src/Plugin/migrate/process/BlockVisibility.php:118:
throw new MigrateSkipRowException();
Proposed resolution
Log a message to MigrateSkipRowException to clearly explain why the row is skipped.
Remaining tasks
Patch
User interface changes
NA
API changes
NA
Data model changes
NA
Comment | File | Size | Author |
---|---|---|---|
#12 | 2959087-12.patch | 2.61 KB | jofitz |
#12 | interdiff-2959087-10-12.txt | 2.27 KB | jofitz |
#10 | 2959087-10.patch | 2.67 KB | jofitz |
#10 | interdiff-2959087-7-10.txt | 2.71 KB | jofitz |
#7 | 2959087-7.patch | 2.26 KB | jofitz |
Comments
Comment #2
rakesh.gectcrComment #3
rakesh.gectcrComment #4
rakesh.gectcrComment #6
rakesh.gectcrComment #7
jofitz CreditAttribution: jofitz at ComputerMinds commentedNo interdiff because I started from scratch.
Comment #8
quietone CreditAttribution: quietone as a volunteer commentedCan this include more information to identity the block? Say the module and bid? I am not sure what is best.
$transformed_value is not needed
Comment #9
quietone CreditAttribution: quietone as a volunteer commentedAh, the is Needs Work too,
Comment #10
jofitz CreditAttribution: jofitz at ComputerMinds commentedAddressed #8.
Comment #11
quietone CreditAttribution: quietone as a volunteer commentedApplied that patch, modified BlockVisibilty plugin to always throw the exception and then ran the d6_block migration to see the error messages.
The block with bid '12' from module 'block' will have no PHP or request_path visibility configuration for destination 'visibility'.
The bid and module really help and will be useful for anyone chasing down a problem. After seeing 24 of these message in the message table I realize that the phrase 'for destination visibility' doesn't add value. The destination will always be 'visibility', it is the defined property name in the Block entity and can't be anything else. So, I think that needs to be removed and then the message is just "The block with bid '12' from module 'block' will have no PHP or request_path visibility configuration.".
Sorry I didn't see that sooner!
Comment #12
jofitz CreditAttribution: jofitz at ComputerMinds commentedImproved the Exception message.
Comment #13
heddnAssuming this comes back green, let's get this merged. All feedback is addressed.
Comment #15
alexpottCommitted and pushed 90870fe81c to 8.7.x and c3cd6fc4e5 to 8.6.x. Thanks!