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.
Migrations are logged to the watchdog, and we present a link to the log of migrations when complete. For reasons I don't recall, I created a custom view for this purpose - unless I can recall a good reason for this, we should instead link directly to the dblog view, filtered appropriately.
Comment | File | Size | Author |
---|---|---|---|
#6 | remove_the_custom-2282055-6.patch | 8.47 KB | cilefen |
#6 | interdiff-3-6.txt | 1.75 KB | cilefen |
#3 | remove_the_custom-2282055-3.patch | 7.3 KB | cilefen |
#1 | dblog.png | 138.84 KB | cilefen |
#1 | message.png | 105.06 KB | cilefen |
Comments
Comment #1
cilefen CreditAttribution: cilefen commentedThe message:
The log:
The reason you may not have done this is because you must play with the $_SESSION to filter dblog. So, if the user decides not to view the log, it will be filtered anyway the next time they view the dblog.
Comment #2
mikeryanYeah, I was afraid it would be something like that. I'm not entirely comfortable with mucking around with $_SESSION here, but it seems like the only way to do the filtering.
But, now I'm wondering if we should do the filtering at all... Looking at my test migration, I see some php notices along with the migrate_upgrade notices that I think should be visible, so maybe it's best to just link to the watchdog page as-is?
@cilefen: Are you on IRC? If so, maybe you could ping Bojahn and/or webchick in #drupal-contribute for their thoughts? If not, I'll do it tomorrow (end of my day here...).
Thanks!
Comment #3
cilefen CreditAttribution: cilefen commentedThis works for me.
Comment #4
cilefen CreditAttribution: cilefen commented@mikeryan I wouldn't worry about messing with $_SESSION. What I have done is exactly what the dblog module does when you filter log messages.
Comment #5
cilefen CreditAttribution: cilefen commentedWe should make the link a form button so the admin affirmatively decides to filter the logs. In this patch, the logs will be filtered whether or not the link is followed.
Comment #6
cilefen CreditAttribution: cilefen commentedI feel a lot better about this solution. The logs become filtered in the session only if the link is clicked. I tried using a form button but that is not going to make sense in drupal_set_message() so I went with a new controller.
Comment #7
mrjmd CreditAttribution: mrjmd commentedI tested this and it seems to be working as intended. Regarding the filtering issue, I agree this is much better than setting the filter when generating the message, as it will confuse people who don't click the link and later visit the logs.
Comment #9
mikeryanCommitted with one tweak, making it "log" instead of "logs". Thanks!