As a subtask of #1622934: Replace delivery callbacks by leveraging the HTTP kernel, fix the overlay module we can now finally safely remove all delivery callbacks and delivery logic, that has already been replaced by the HTTP kernel and event subscribers.

Estimated effect: Removal of > 250 unused lines. Yay :)

Comments

socketwench’s picture

StatusFileSize
new12.19 KB

I hope I did this right...

Crell’s picture

Status: Active » Needs review

Let's ask the bot.

socketwench’s picture

Hm. I didn't remove the 4 string references to ajax_deliver(). What do we do with those?

Crell’s picture

If the function never gets called anyway, we may as well just remove them. In fact, the entire delivery callback can be purged entirely. Everything is now done via mime type.

socketwench’s picture

That's usually where I get confused. It *looks* like all of ajax_test.module would need to go away, and the reference in file_menu(). I would assume the body of hook_page_delivery_callback_alter() would be empty too?

socketwench’s picture

StatusFileSize
new16.64 KB

Removed additional function references, but not those in ajax_test.module.

Crell’s picture

Status: Needs review » Needs work

hook_page_delivery_callback_alter() probably goes away entirely, since there's nothing for it to alter.

I don't think ajax_test.module goes away, as FrameworkTest is still using it. It's just detecting based on the mime type now. However, the delivery callback lines in its hook_menu() should get removed, as should the references in file_menu() and anywhere else that they appear.

socketwench’s picture

Status: Needs work » Needs review
StatusFileSize
new20.46 KB

Removed additional references.

Status: Needs review » Needs work

The last submitted patch, RemoveDeliver-1677304-8.patch, failed testing.

chx’s picture

Run Drupal\field\Tests\FormTest and check the verbose output. Where HTML is expected something is not so: simplexml_import_dom(): Invalid Nodetype to import

socketwench’s picture

Did that...but the results aren't making any sense to me...

Niklas Fiekas’s picture

Status: Needs work » Needs review
Issue tags: -Novice
StatusFileSize
new9.2 KB
new25.91 KB

Thanks @socketwench!

Only one minor point that might be causing the test failures: This is the next round, bringing back the menu items and removing *just* the delivery callback key.

Also dropping all references now, except those in the overlay module.

Is it required / does it make sense to write an update function that drops the delivery_callback field on the menu_router table, or is that going to be replaced anyway?

Crell’s picture

I'm planning to replace that table entirely anyway, so I don't much care if we drop that field now or not.

Niklas Fiekas’s picture

Alright, then this patch should be good to go.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Then #12 looks done to me. Yay for patches with lots of minus signs! :-)

yched’s picture

Shouldn't there be an update func to drop the delivery_callback column from the menu_links table ?

Niklas Fiekas’s picture

Crell's point in #13 was, that the whole table is going to be replaced anyway. If we weren't pretty sure that will indeed (hopefully soon) happen, then yes: totally.

sun’s picture

Issue tags: +API change, +API clean-up

Nicey. :)

dries’s picture

#12: 1677304-remove-delivery-12.patch queued for re-testing.

dries’s picture

Asking for a re-test as the patch don't seem to apply for me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1677304-remove-delivery-12.patch, failed testing.

Niklas Fiekas’s picture

Status: Needs work » Needs review
StatusFileSize
new18.57 KB
sun’s picture

Status: Needs review » Needs work

The re-rolled patch is missing code removals from menu.inc, system.api.php, system.module, and system.install.

Niklas Fiekas’s picture

Status: Needs work » Needs review
StatusFileSize
new26.01 KB

This one should be complete. Did the diff before actually finishing the rebase :)

sun’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Win! :)

tim.plunkett’s picture

Title: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page() » Change notification for: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page()
Priority: Normal » Critical
Status: Fixed » Active
Issue tags: +Needs change record

This was a fairly big change, and it was very unclear what to do to deal with these being replaced.

Niklas Fiekas’s picture

Title: Change notification for: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page() » Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page()
Priority: Critical » Normal
Status: Active » Fixed
Issue tags: -Needs change record

Ah ... sorry. I should have said: This is just a sub-issue of the (already critical) #1622934: Replace delivery callbacks by leveraging the HTTP kernel, fix the overlay module . We knew we would remove drupal_deliver_page(), ajax_deliver() and drupal_deliver_html_page() and the concept of delivery callbacks, but were not 100% finished with a replacement. (Pretty close, though, thanks to @katbailey - #1599108: Allow modules to register services and subscriber services (events).)

So I'd prefer to create a change notification summarizing all the related changes from that master issue, once we figured it out.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gábor hojtsy’s picture

Title: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page() » Change notification for: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page()
Priority: Normal » Critical
Status: Closed (fixed) » Active
Issue tags: +Needs change record

No change notification or further work materialized in #1622934: Replace delivery callbacks by leveraging the HTTP kernel, fix the overlay module and it was rescoped to fix follow bugs, but the change notice is still not done.

webchick’s picture

This has been waiting for a change notice for over 6 weeks now. Let's please get this knocked out.

Crell’s picture

Added change notice here: http://drupal.org/node/1937056

It could probably stand some revising, but if you (the royal you) think it's good enough for now, go ahead and mark this issue fixed.

gábor hojtsy’s picture

@Crell, thanks. It does not seem to be enough for me to understand how systems using the prior functionality should now adapt. Which is the purpose of the change notice :) Eg. how would #1848210: [Tests] Submitting a form in Overlay shows content + dsm() for a split second before redirecting to front-end theme be possible to resolve is one thing I expected to learn from here, since that is a use case where core still attempts to use the non-existent functionality.

Crell’s picture

My knowledge of overlay is minimal at best, so I don't really follow what's going on in that issue. If you could explain (probably there, not here) what exactly that has to do with drupal_deliver_page() I might be able to say something intelligible on the subject, and figure out what the appropriate "modern" alternative is. (Which would help with a more useful change notice.)

gábor hojtsy’s picture

krlucas’s picture

I'm working on updating the change notification and specifically reviewing the overlay issue to see if I can figure out something coherent. Thanks!

xjm’s picture

Issue tags: +SprintWeekend2013
krlucas’s picture

Status: Active » Needs review
Issue tags: -SprintWeekend2013

I've updated the change notice here http://drupal.org/node/1937056. Specifically, I discussed how (I guess) one can achieve the functionality of hook_page_delivery_callback_alter() by creating an event listener for "onRequestSetController".

podarok’s picture

Title: Change notification for: Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page() » Remove drupal_deliver_page(), ajax_deliver(), drupal_deliver_html_page()
Priority: Critical » Normal
Status: Needs review » Fixed
Issue tags: -Needs change record

#38 looks good
back to fixed and fixing title
thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.