Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
dblog.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Apr 2013 at 02:18 UTC
Updated:
29 Jul 2014 at 22:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
cbTagging
Comment #2
cbOk, two patches here.
One is the diff against origin/8.x and one is against a branch created using the patch at #1977254: Convert dblog_overview() to a Controller (do not test.)
Hopefully this is ok.
Comment #3
larowlanComment #5
cbRerolled against 8.x.
Comment #6
cbComment #7
dawehnerThat's really good so far
Don't we still need the search module for this functionality? The problem with that is, that it will appear in the menu, but you will get a 404 at the end.
Something like "The database connection" is more descriptive.
The constructor needs some documentation.
Missing @return
That's not really a page callback anymore :)
This @see doesn't seem to be really helpful anymore. What do you thin?
Nice!
Comment #9
cbSome of the things picked up are from #1977254: Convert dblog_overview() to a Controller which makes up the majority of this patch.
I've been speaking with larowlan about how to roll these patches when other dependent patches have not yet been committed, I'm not sure I'm doing it right... :|
Will base new patches off both 8.x and that other issue tomorrow.
Comment #10
cbOk, new patches attached.
The 'do-not-test' patch is a diff against #1977254: Convert dblog_overview() to a Controller which is not yet in 8.x but is a requirement for this issue.
The other patch includes the changes in #1977254: Convert dblog_overview() to a Controller and is against 8.x.
Please, when reviewing my work, review only the changes in 'do-not-test' as the rest of the changes are handled in #1977254: Convert dblog_overview() to a Controller.
Hopefully that makes sense.
Comment #12
cbInterestingly, this is falling over with events like this;
DBLog event was recorded: [content added]
Which is odd as none of that functionality was touched and the patch at #1977254: Convert dblog_overview() to a Controller which contains most of the code is green.
I'll have to dig into it later.
Comment #13
cbOk, so it seems I killed the /dblog route with my routing. So, rather than add three routes for these three reports, I added regex to match the reports negating /dblog. Works well.
Comment #15
cb#13: convert-dblog_top-to-a-controller-1982954-13.patch queued for re-testing.
Comment #17
cbOk, so, my 'block /dblog path' was a silly idea. I changed my regex to match the required paths, rather than block other paths.
Comment #18
cbComment #19
ParisLiakos commentedlets wait for this #1977254: Convert dblog_overview() to a Controller
Comment #20
cbNow that #1977254: Convert dblog_overview() to a Controller is done, I'll roll this against the updated core code.
Comment #21
ParisLiakos commentedComment #22
dawehner#17: convert-dblog_top-to-a-controller-1982954-17.patch queued for re-testing.
Comment #24
dawehnerRerolled against the dblog overview push.
Comment #25
ParisLiakos commentedthis is so cool!
i cant see though dblog_top's removal, is it used anywhere?
Comment #26
dawehnerYou are totally right.
Comment #27
ParisLiakos commentedi am not sure why...but after applying this patch,
admin/reportsmisses all those 3 links:( just tested on simplytest.me:/Comment #28
dawehnerThat's more tricky to solve.
The requirements checking via a regex on parameters is not based on the access manager but on some symfony related regex bits.
Comment #29
star-szrSeems like we can reroll at least.
Comment #30
rainbowarrayHere's a reroll of the patch in #26.
Comment #31
rainbowarrayHere is an updated patch with the reroll as well as changing drupal_set_title to $build['#title'] . Hope I understood this correctly.
Comment #32
rainbowarrayHere's an interdiff for the patch in #31.
Comment #33
rainbowarrayFixed a couple bugs in the reroll in #30 and the title fix in #31.
Comment #34
disasm commentedGreat job on the reroll mdrummond! Here's some minor coding style modifications that need done.
add this blank line back.
add blank line between these also.
needs new line at end of file
extraneous spaces at end of this line
Change t( to $this->t(
Comment #35
rainbowarrayI made the above changes.
I changed all the t functions to $this->t functions. If that was too aggressive, my apologies.
Comment #36
rainbowarrayComment #37
disasm commentedNewline character still isn't correct. Get rid of the spaces. Note that when you have missing newline character at end of file, or extra spaces at ends of lines, git diff should show it in bright red background text.
$this->t() and other changes are perfect.
Comment #39
rainbowarrayGot rid of the spaces this time.
Comment #40
disasm commentedComment #42
dawehnerNow that the views integration is in it seems resonable to just use views to provide this top listing: #2015149: Replace dblog recent log entries with a view
Comment #43
disasm commentedPatch fixes remaining test failures. As for #42 I have no problems with switching this to a view, but I think that would make more sense to do in a follow-up issue and get this committed before we change our strategy on these conversions.
Comment #44
dawehnermhh, why did you removed the module('search') bit? Doesn't that mean that the link might still appear?
Maybe we could write something like: Thrown when watchdog listing for search got accessed but search is not enabled.
Comment #45
disasm commentedaddressed comments in #44.
Removed title from hook_menu
Comment #46
disasm commentedAlso, renamed top() method to topLogMessages()
Comment #47
dawehnerPerfect, thank you!
Comment #48
alexpottWithout the titles in the hook_menu implementation the menu items disappear.
Before patch
After patch
Comment #49
disasm commentedok, adding titles back in to hook_menu.
Comment #51
disasm commented#49: drupal8.dblog-module.1982954-49.patch queued for re-testing.
Comment #52
dawehnerGreat!
Comment #53
jibran#49: drupal8.dblog-module.1982954-49.patch queued for re-testing.
Comment #55
dawehnerYes, it would make sense to use a view for that, but the other issue is on needs work and we need to get rid of the old router items: #2015149: Replace dblog recent log entries with a view
Comment #56
andypostHere's a fixed patch.
1) Page title inherited from menu
2) Reverted unused changes
3) no reason to have
{type}- straight conversion so here's 3 routesI don't think we need to implement route subscriber to add search route depending on module existence, just hidding of menu item is enough
Comment #57
dawehnerAt least let's not drop the title from the route definition, this is wrong.
Comment #59
disasm commentedIt's either commit #56 or fix the test to use a normal quote and not an html escaped quote. When _title is used, the quote isn't converted to ', hence why I fixed the test.
Comment #60
andypostI see no reason in title for this routes because we always have menus for them.
And this is a conversion of callback to controller so let's leave menu and titles as they are
Comment #61
dawehnerThat is not true. For things like building the breadcrumb we should better use the title on the route definition.
I guess I mixed up the single quote syntax of yaml, ... feel free to fix it.
Comment #62
jibranSee http://yaml.org/spec/current.html#id2534365
Comment #63
andypostSeems '_title' in yml is not passed
check_plain()Comment #64
disasm commentedYour syntax is correct, just the way the title is rendered in hook_menu and in _title is different.
Comment #65
googletorp commented#63: dblog-1982954-62.patch queued for re-testing.
Comment #67
googletorp commentedRerolled the patch since #2089635: Convert non-test non-form page callbacks to routes and controllers ruined the patch that was created.
I kept the naming of the routes that was already created in #2089635: Convert non-test non-form page callbacks to routes and controllers since they seemed to be more consistent with rest of core (dblog.search vs dblog_top_search)
Comment #69
googletorp commentedFixed the above issue, which meant removing the dblog.search as an dynamic route and use the static type which was introduced in the original patch.
Comment #71
jibranIt is \Drupal now.
Comment #72
googletorp commentedI did what #72 said and fixed the issue from the test.
Comment #73
andypostI found no nitpicks
Comment #74
alexpottPatch no longer applies.
Comment #75
disasm commentedstraight reroll. If this is green back to RTBC.
Comment #76
dawehnerStraight RTBC though I realized that we could improve somehow the information available on on the 403/404 pages. Message is not really the proper table header

as this is always just the path where the error happened.
Comment #77
cosmicdreams commentedDaniel can you explain in a follow up issue?
Comment #78
dawehnerThere you go: #2105431: Rename the table headers on the watchdog 403/404 controllers
Comment #79
googletorp commented+1 This is RTBC.
Comment #80
xano#75: drupal8.dblog-module.1982954-75.patch queued for re-testing.
Comment #81
oriol_e9guntag
Comment #82
alexpottThe with this patch applied the dblog.routing.yml file has a duplicate entry for dblog.search. They need to be combined :)
Comment #83
sidharthapThank you
corrected #82
Comment #84
xanoHere's the interdiff.
Comment #85
alexpott#84 the interdiff is twice the size of the patch :) - not so helpful!!!
Comment #86
kim.pepper83: drupal8.dblog-module.1982954-83.patch queued for re-testing.
Comment #87
andypostPatch still appplies, and this is just great clean-up
Comment #88
webchickCommitted and pushed to 8.x. Thanks!