Jump to content

Unable to print invoice after upgrade


Dave Co
 Share

Recommended Posts

Hi I have recently updated cubecart from version 6.1.0 to 6.1.1 and after receiving a cart order I tried to print an invoice and it is return the below server error.

Internal Server Error

"The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."

I have been on with my web hosting team and they cannot find any error on their side. If I reinstall version 6.1.0 it works fine. 

can anyone provide some assistance with this please 

Link to comment
Share on other sites

Yes I think so I added the error log script and went to print and this was the log above, it is also adding a php file to the files folder but not deleting it 

sorry for sounding vague gents not very good on this sort of thing.

I have even tried a clean install of cubecart and database v6.1.1 and added a test product and tried to print and it is still the same. the hosting team cannot work it out they say everything is fine,  

Link to comment
Share on other sites

Yes I think so I added the error log script and went to print and this was the log above, it is also adding a php file to the files folder but not deleting it 

sorry for sounding vague not very good on this sort of thing 

its called print.6438e83688d4f3313319f22736559081.php

it appears to be the invoice details 

 have added the file but taken out personal details text 

print.6438e83688d4f3313319f22736559081.php

Link to comment
Share on other sites

Ok. The process to print an invoice is:

1. CubeCart uses the template at /admin/skins/default/templates/orders.print.php. (Note, the admin folder may have a different name.)
2. Populate the template with the data.
3. Write the rendered template to a file in the /files/ directory.
4. This file is a PHP file and its bottom-most statement (after all the HTML - which will be been sent to the browser) is to delete itself.
5. CubeCart sends a 301 Redirect to the browser telling it to load that file.

So, you have spotted the existence of /files/print.hash.php. Until the browser requests that file, it will not delete itself.

The next test is to see if CubeCart does actually send the 301 Redirect to your browser. That will require you to use your browser's diagnostic functions and examine the Network traffic (aka, the waterfall).

Let us know if you need instruction on how to do that.

 

Link to comment
Share on other sites

I use FireBug extension in FF, but other browsers will have something similar. One of the choices when you right click on the Order Summary page in CC will be "Inspect Element with FireBug".

Choose the Net tab and then click on the Print icon for the order. I just tried it with an order of mine - didn't get as much waterfall as I had hoped. But Bsmither is the one who can make sense of it if anyone can. You may need to expand the results and then take a screenshot to show him what you see.

Link to comment
Share on other sites

I've hidden your last response, as it contains the renamed admin file naming (that needs to be blurred out before you save the file and display it here). You will need to change the renamed admin file/folder naming to keep your install safe.

Your screenshot looks more like the results of refreshing the Order Summary tab than clicking on the Print icon. Please try it again and be sure to CLEAR, be sure it's on ALL for Network, and THEN click the icon. You might want to message @bsmither with your results instead of trying to display them in a secure way here.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...