Status

()

Core
Printing: Output
UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: Chris, Unassigned)

Tracking

37 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150402191859

Steps to reproduce:

We have developed a local website for despatching orders running on Apachi, PHP, MySQL.  

From the view order page, you press the button Delivery Note, then it loads the delivery note on the page.  

Press the Print button, it opens the windows.print() and you can either Print or Cancel.  ( we also use JSPRINT addon but I tried turning that off aswell and it does the same thing. )


Actual results:

When you press OK to print out the page, it prints no problem at all.  But then it just stops.

When you Press the Print Button its mean to open the print command, press OK to print and then it reloads the page and runs a small mysql query to log the audit table and return you to the View Order Page.


Expected results:

When you Press the Print Button its meant to open the print command, press OK to print and then it reloads the page and runs a small mysql query to log the audit table and return you to the View Order Page.  

If you press print, and press Cancel it runs the scripts and reloads the page, it just does not do it if you press OK.  

I am not sure if its a firefox bug or something else.  I havnt changed our code for printing for last few years.  Its affected everyone and I am thinking that maybe its come on after a firefox update.
Component: Untriaged → Printing: Output
Product: Firefox → Core
Can you provide a small testcase that demonstrates the problem?
Or give us access to the web site so we can investigate?
Flags: needinfo?(cwilliams)
(Reporter)

Comment 2

3 years ago
I am not sure how to make a small test case, and I am unable to give you access to the site as its not live its just runs local for us.

Here is a snippet of the code we use.


****** Print Button *******
echo "<p>Please check that you are satisfied with the order packing before accepting and printing</p>",
  		 "<table><tr><td>",
  		 "<form action=\"packpallets.php\" method=\"post\">",
		 "<input type=\"hidden\" name=\"PID\" value=\"" . $OrderNum ."\" />",
		 "<input type=\"hidden\" name=\"PackNoPals\" value=\"" . $DefNoPals ."\" />",
  		 "<input name=\"PrintPacking\" onClick=\"DoPrint(" . $PrintNo . ");\" type=\"submit\" value=\"Accept & Print Page\"/>",  // calls jsprint script so we can control the print settings and no of copies etc
  		 "</form>";

****************************

Then, when you press OK to print it prints out the page.  It should reload the page from the form above.

The next code after reloading the page:

if (isset($_POST['PrintPacking']))
{
  //  some scripts in here that writes our audit files and update the fact you printed a packing sheet out then it changes the exitorder flag to 1 from 0
  $exitorder = 1;
	
}


if ($exitorder == 1)   // returns you to the view order page
{
        	$url = "vieworder.php?pid=" . $OrderNum;
		header("Location: $url");
        	exit();
}

If you press the "Accept & Print Page" button and then press Cancel, we dont actually check what the user has pressed so it assumes you have pressed yes, it then updates the Audit files and returns to the vieworder.php page without printing anything.

Our work around at the moment, its to press PRINT -> YES then press PRINT -> CANCEL to return to the previous page.
Flags: needinfo?(cwilliams)
(In reply to Chris from comment #2)
> I am not sure how to make a small test case,

Could you make a test page that simulates what your real web page
is doing and put that on a public web server?

> and I am unable to give you
> access to the site as its not live its just runs local for us.

I'm afraid there's not much we can do here without being able to
reproduce the problem you're seeing.
Flags: needinfo?(cwilliams)
(Reporter)

Comment 4

3 years ago
OK thanks for the help I will see if I can do that, if I can I will post info here.

Cheers
Flags: needinfo?(cwilliams)
(Reporter)

Comment 5

3 years ago
I have not managed to make a test site but firefox updated to V38 the other day and the problem still exists.  

I installed google chrome today and it works properly.  When you press our print button it, it opens the chrome print dialogue, press the print button and it prints, then when it returns to our page it carries on and runs the rest of the code then redirects the user to the View Order page.  

I have downloaded Firefox V36 and it works fine so this problem is definately new with Firefox update 37 onwards.
You need to log in before you can comment on or make changes to this bug.