Jump to content
Maaike

Can't print out invoices (do I have to start over)

Recommended Posts

When I try to print out invoices and shipping documents the pdf-readers says the documents are damaged.  Also on the same time an error apeared in the editting of products. We can't save them. The save button is not clickable.  And after a time a box apears telling us to contact our hosting. We tryed a few things the last couple of weeks. But then one day all worked fine. But a week later after the weekend, the same problem apeared.

We asked the provider about it. The say the have no error. So not ther problem. We found this error in all the problems: Notice on line 2101 in classes/Tools.php  [8] Array to string conversion. But nothing stainge is ther. 

Now I don't have any idee anymore. Have to work and need the invoices, but can't. Is the only salution to our problems  to start over? And is this possible if I take over the database...

Share this post


Link to post
Share on other sites

Hard to help you as your problem description is so minimalistic:

 - which Prestashop version are you using?

 - did you check for javascript errors?

 - you say there is nothing strange on line 2101. Why don't you quote the lines. Maybe other people draw different conclusions.

 - your save button problem suggests that not all tabs of your product page are loaded. However, you don't show us the box that appears that might give us a suggestion which tab is problematic. I suggest you to open every tab to look if it is there.

 - did you have a look at the error log of your server?

 

Share this post


Link to post
Share on other sites

Try to disable all non Prestashop modules and overrides on Advanced Parameters > Performance to exclude an effect of modules.

Share this post


Link to post
Share on other sites
On 4/4/2019 at 9:24 PM, musicmaster said:

Hard to help you as your problem description is so minimalistic:

 - which Prestashop version are you using?

 - did you check for javascript errors?

 - you say there is nothing strange on line 2101. Why don't you quote the lines. Maybe other people draw different conclusions.

 - your save button problem suggests that not all tabs of your product page are loaded. However, you don't show us the box that appears that might give us a suggestion which tab is problematic. I suggest you to open every tab to look if it is there.

 - did you have a look at the error log of your server?

 

I am using version 1.6.1.23

The problem is on every tab when I am opening a product. I just can't do a thing exept of seeing it. Because I can't save a thing. See picture for the error. I has been goin for 3 days, but thoday its back. So I realy can't figure out what the bug is, its to strange for me.

Notice on line 2101 in classes/Tools.php 
[8] Array to string conversion.

On that line is this: 

curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

I have no idea what is going wrong and why. 

It's part of this: 

if (function_exists('curl_init')) {
            Tools::refreshCACertFile();
            $curl = curl_init();

            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($curl, CURLOPT_URL, $url);
            curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
            curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
            curl_setopt($curl, CURLOPT_CAINFO, _PS_CACHE_CA_CERT_FILE_);
            if ($stream_context != null) {
                $opts = stream_context_get_options($stream_context);
                if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post') {
                    curl_setopt($curl, CURLOPT_POST, true);
                    if (isset($opts['http']['content'])) {
                        parse_str($opts['http']['content'], $post_data);
                        curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
                    }
                }
            }
            $content = curl_exec($curl);
            curl_close($curl);
            return $content;
        } else {
            return false;

I asked my hosting to have a look in the error log. They found nothing.

prestashop error.PNG

Edited by Maaike (see edit history)

Share this post


Link to post
Share on other sites

That does work. But... How do I figure out in witch module the problem is? I can't leave them all out. My payment module is out then to and the shipping module.

Share this post


Link to post
Share on other sites

I have only one recommendation. Rename all folders under the /modules one. One-by-one (like ps_banner to ps_banner_) and always try to create the invoice. This should point to the wrong module.

  • Like 1

Share this post


Link to post
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More