michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
309 stars 49 forks source link

Web Interface: "Test page" and "Identify" do not work #81

Closed tillkamppeter closed 3 years ago

tillkamppeter commented 3 years ago

Describe the bug In both the PAPPL test Printer Application and in the PostScript Printer Application 4 buttons show at each printer: "Media", "Print defaults", "Identify", and "Test Page" (note that I have added a test page callback to the PostScript Printer Application today which makes this button show). The two former buttons work: The pointer turns into a hand when hovering over the button and when clicking the appropriate page easily shows (I had already reported several issues on these pages which you have fixed). The two latter buttons do not work. The pointer stays an arrow, does not turn into a hand, and when clicking it takes some time and then the page turns white, and the URL in the address line stays "localhost:8000". The printer Application does not crash, as One can hit "Reload" in the browser and the front page of the web interface shows again. The buttons also seem not to execute their functionality, as I am running the PostScript Printer Application with debug logging and I have papplLog() calls in my test page callback (ps_testpage()) and these messages do not appear in the log, so the callback did not get called.

To Reproduce In any Printer Application, click the "Identify" or "Test Page" of a printer in the web interface. The functionality is not executed and after some seconds the screen gets white.

Expected behavior "Identify" and "Test Page" get triggered when the buttons are clicked.

michaelrsweet commented 3 years ago

@tillkamppeter Strange, it works for me... Will do some more testing to see what's up...

michaelrsweet commented 3 years ago

OK, I see what the problem is - the form buttons on the main page (as opposed to the printer page) use the current page's URI for the form destination when it needs to be the printer's page URI instead.

tillkamppeter commented 3 years ago

From the printer page printing the test page actually works, but also on the printer page the mouse pointer does not get a hand when moving over the "Test Page" or "Identify Printer" button.

michaelrsweet commented 3 years ago

[master ab3bba2] Fix identify/test page buttons on server home page (Issue #81)

@tillkamppeter The mouse pointer issue must be because it is a form button and not a link. I'll see what CSS sorcery I can figure out to fix that so they are consistent...

michaelrsweet commented 3 years ago

[master 3c64578] Add cursor: property to button CSS to make all button-like content use the same pointer cursor (Issue #81)

tillkamppeter commented 3 years ago

Now it is all working for me: Printing test page from both main page and printer page and also the mouse cursor turns a hand on all buttons.