Problem with plugin Attach Invoice PDF and logo in HS

  • Posts: 27
  • Thank you received: 1
  • Hikashop Business
1 year 5 months ago #352369

-- url of the page with the problem -- : www.marrys.nl
-- HikaShop version -- : 4.7.3
-- Joomla version -- : 4.3.2
-- PHP version -- : 8.0
-- Browser(s) name and version -- : firefox/safari
-- Error-message(debug-mod must be tuned on) -- : Er heeft zich een fout voorgedaan
2 Unable to get the size of the image [ www.marrys.nl/images/Logos/marrys-logo.png ]

I have installed a logo on the main page of Hikashop. When I skip the plugin Attach Invoice (PDF) 2.0 everything is OK. Or turn it off = OK

But when I put ON I get a error:
Er heeft zich een fout voorgedaan.

2 Unable to get the size of the image [ www.marrys.nl/images/Logos/marrys-logo.png ]

I have also checked PHP 8.1. But no change.
allow_url_fopen On On
allow_url_include Off Off

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352372

Hi,

This error means that the library the plugin uses to retrieve the image to include it in the PDF is not able to download it.
So it's a server configuration issue.
It could be that file_get_contents or cURL is not available on the hosting, or allow_url_fopen or allow_url_include are turned off:
stackoverflow.com/a/28007106
It seems you're saying allow_url_include is turned off on your hosting so that might be the reason. It could also be that ini_get is not available or not returning the correct value for some reason.
I would recommend checking with your hosting support what can be done. Unfortunately, since it's a server configuration issue, there is not much we can do on our end.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 1
  • Hikashop Business
1 year 5 months ago #352459

I have forwarded the info to the provider support. At first they responded from there we can't do anything about it. That is a matter for Joomla and Hikashop.

I asked further. Now for an answer:

Which URL is being called with the file_get_contents, cURL, allow_url_fopen, or allow_url_include functions? Then we can ask the server administrators if the requests are blocked by our Web Application Firewall.
Is that a logical question? Do you have an answer to that?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352464

Hi,

Well, the URL called is www.marrys.nl/images/Logos/marrys-logo.png
I'm not sure what information you sent them, but the error message in your first post here provides that information.
Also, I don't think that the problem is with the WAF (Web Application Firewall).

Note that from what you said allow_url_include is turned off. It could be the reason of that issue. And this is something which can be changed in the php.ini of the server.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 1
  • Hikashop Business
1 year 5 months ago #352518

Hi
This is the answer of the provider:
I do see that allow_url_include is disabled on the server. Because a shared hosting environment is used, this function cannot be enabled.

It is best to change the URL to the relative URL. If the script containing the URL is in the folder www.marrys.nl , you need to change the URL to images/Logos/marrys-logo.png.

I have tried to change the URL but have the same error. I have the URL deleted in the configuration.

Is it possible to change the source of the plugin lay-out of Attach Invoice 2.0? Than I will try to put the logo inside the html source of the PDF. Is that possible?

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 5 months ago #352519

Hello,

You will find the file to edit in your attachinvoice folder :
=> Your_Website\plugins\hikashop\attachinvoice\attachinvoice
Then, you have to edit the relative file, this will depends on which Invoice Layout you have select in your plugin settings

Hope this will help you to solve your issue.
Regards

Last edit: 1 year 5 months ago by Philip.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum