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.
Attached patch is a feature request to use a Views instead of a static page, following previous issue #2938885.
I include a bulk form action plugin to delete multiple rows and exposed quick filter to search on domains (including referer) and query strings.
Module reinstallation is necessary to write Views and Action plugin config files.
We're about to use it on a live website.
Best regards.
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff-2938896-13-16.txt | 6.16 KB | manojapare |
#16 | 2938896-16.patch | 37.07 KB | manojapare |
#13 | 2938896-13.patch | 31.83 KB | manojapare |
#8 | 0001-Replace-BrokenLink-list-with-a-Views-page.patch | 32.22 KB | b2f |
Comments
Comment #2
b2f CreditAttribution: b2f commentedComment #3
b2f CreditAttribution: b2f at Smile commentedComment #4
b2f CreditAttribution: b2f at Smile commentedUpdates view permission with 'manage broken link list
Comment #5
b2f CreditAttribution: b2f at Smile commented#4 patch above tested locally with composer-patches (https://github.com/cweagans/composer-patches).
Comment #6
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedWhen searching for `Request parameters` in `/admin/config/broken_link`. Getting WSOD.
Error details:
Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "Exception in Broken Links[broken_link]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'broken_link__query_string.query_string' in 'where clause': SELECT broken_link.hits AS broken_link_hits, broken_link.updated AS broken_link_updated, broken_link.id AS id FROM {broken_link} broken_link LEFT JOIN {broken_link__query_string} broken_link__query_string ON broken_link.id = broken_link__query_string.entity_id AND broken_link__query_string.deleted = :views_join_condition_0 WHERE broken_link__query_string.query_string LIKE :db_condition_placeholder_1 ESCAPE '\\\\' ORDER BY broken_link_hits DESC, broken_link_updated DESC LIMIT 101 OFFSET 0; Array([:db_condition_placeholder_1] => %test% [:views_join_condition_0] => 0)" at /core/modules/views/src/Plugin/views/query/Sql.php line 1496, referer: /admin/config/broken_link
Also, prefer update path instead of reinstalling the module, which will be not possible without data loss.
Comment #7
b2f CreditAttribution: b2f at Smile commentedComment #8
b2f CreditAttribution: b2f at Smile commentedAttached a new update from broken_link.install to avoid a module reinstallation.
I also remove referers and query string filters as they don't seem to be important.
Comment #9
b2f CreditAttribution: b2f at Smile commentedComment #10
b2f CreditAttribution: b2f at Smile commentedComment #11
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedPatch looks good. I feel, it will be better if we keep referers exposed filter like link.
Comment #12
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedSince we are aggregating the referers for each broken links with their count. We can avoid filter using referers. Now the update is also working fine. No need for re-installation of the module.
Comment #13
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedFound one issue. In admin configuartion page I can see two links for Broken Link.
Fixed the same in this patch.
Comment #14
b2f CreditAttribution: b2f at Smile commentedComment #15
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedWhen adding views filter for Referers fields it is throwing error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'broken_link__referers.referers' in 'where clause': SELECT broken_link.hits AS broken_link_hits, broken_link.updated AS broken_link_updated, broken_link.id AS id FROM {broken_link} broken_link LEFT JOIN {broken_link__referers} broken_link__referers ON broken_link.id = broken_link__referers.entity_id AND broken_link__referers.deleted = :views_join_condition_0 WHERE broken_link__referers.referers LIKE :db_condition_placeholder_1 ESCAPE '\\' ORDER BY broken_link_hits DESC, broken_link_updated DESC LIMIT 101 OFFSET 0; Array ( [:db_condition_placeholder_1] => [:views_join_condition_0] => 0 )
Comment #16
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commentedFixed the additional fields issue with views filter and sort. Also has added referers as an exposed filter in broken link views.
Comment #17
ajay_reddyThis patch works fine while listing all fields in views and sorting also looks good.
Comment #19
manojapare CreditAttribution: manojapare as a volunteer and at Valuebound commented