Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Can't seem to add images to my emails.
Next Page
Author « Topic »
Page: of 2

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  07:46:30  
I'm having trouble adding images to my email messages. I've tried uploading and setting links, and I almost always get the message "Something went wrong, please try again".

Occasionally the image appears anyway, but it usually goes away when I submit the changes.

I have inserted images in the past.

I'm on version 7.1.4, running PHP version 7.3. Using Froala, and I just uploaded a fresh froala folder to my vsadmin.

I see a small gallery of stock images if I choose "Browse" from insert images. Those work, but those seems to be hosted on froala.

https://www.ragandbone.ca/boxoffice/products.php

I must be missing something!

1818charlie
ECT Moderator

United Kingdom
1177 Posts

Posted - 10/07/2019 :  10:01:42  
Hi John

Have a look in the Froala folder on your site for the error log which should narrow down what is causing the error.

Steve
Manchester, UK

Using ECT since 2004

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  10:08:58  
Hmm...I can't seem to see it. You say it should be in vsadmin/froala?

1818charlie
ECT Moderator

United Kingdom
1177 Posts

Posted - 10/07/2019 :  10:20:03  
Hi John

Yes, the error log was showing in the Froala folder. Out of curiosity, do you get the same message if you try adding an image to a product description in the admin?

Steve
Manchester, UK

Using ECT since 2004

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  10:23:46  
I don't see any log file in my froala folder, or in any of its subfolders.

And, yes, I get the same error in the product description editor.

Later in the day, I'll run the latest updater on my store in case something got scrambled.

Edited by - John Nolan on 10/07/2019 10:27:01

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  10:47:09  
I am able to cut and paste the code for one of the images I successfully uploaded in the past, and that works.

1818charlie
ECT Moderator

United Kingdom
1177 Posts

Posted - 10/07/2019 :  11:01:26  
Hi again John,

I'd grab the latest Froala files from the ECT site too

Steve
Manchester, UK

Using ECT since 2004

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  11:18:01  
Yes, I did that already.

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  11:40:51  
Hmm...I found this in my cPanel:
"[Mon Oct 07 11:21:53.345701 2019] [lsapi:error] [pid 17251:tid 47088005474048] [client 185.93.229.6:1491] [host www.ragandbone.ca] Backend fatal error: PHP Fatal error: Uncaught Exception: [Mon Oct 07 11:21:53.345701 2019] [lsapi:error] [pid 17251:tid 47088005474048] [client 185.93.229.6:1491] [host www.ragandbone.ca] Backend fatal error: PHP Fatal error: Uncaught Exception: The Froala Editor SDK library requires the imagick extension."...etc.

So, "The Froala Editor SDK library requires the imagick extension", does it? Now I just have to figure out what to do about that!

Edited by - John Nolan on 10/07/2019 11:42:09

dbdave
ECT Moderator

USA
10245 Posts

Posted - 10/07/2019 :  11:47:05  
imagick would be something your hosting plan requires for the upload to work.

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  11:52:59  
Okay, I installed the imagik extension in cPanel, and now I get :

[Mon Oct 07 12:48:00.595674 2019] [lsapi:notice] [pid 17251:tid 47088005474048] [client 185.93.229.6:7102] [host www.ragandbone.ca] Backend log: PHP Warning: move_uploaded_file(): Unable to move '/tmp/phpZTlcD0' to '/home/jnolan/public_html/prodimages/giftcertificate.png' in "...etc.

Not too surprising, since I don't have a "prodimages" folder in my root directory. So, I suppose I could create one, but, shouldn't the images be going somewhere else?

Edited by - John Nolan on 10/07/2019 11:56:41

Vince
Administrator

42428 Posts

Posted - 10/07/2019 :  12:18:56  
Hi John
Yes, prodimages is assumed for the product images. But if you want to override this, there is a file...
vsadmin/froala/upload_image.php
...and you can set a different directory there.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  12:35:41  
So, if I want to upload files to a directory called "images" in my vsadmin folder, what changes do I make?

Sorry to be thick.

Right now the file reads:

<?php
//This code is copyright (c) Internet Business Solutions SL, all rights reserved.
//The contents of this file are protected under law as the intellectual property of Internet
//Business Solutions SL. Any use, reproduction, disclosure or copying of any kind
//without the express and written permission of Internet Business Solutions SL is forbidden.
//Author: Vince Reid, vince@virtualred.net
session_cache_limiter('none');
session_start();
if(@$_SESSION['loggedon']=='') exit;

// Include the editor SDK.
require 'lib/FroalaEditor.php';

// Store the image.
// try{
$response = FroalaEditor_Image::upload(@$_GET['loc']=='2'?'/images/':'/prodimages/');
echo stripslashes(json_encode($response));
// }
// catch(Exception $e){
// http_response_code(404);
// }
?>

Vince
Administrator

42428 Posts

Posted - 10/07/2019 :  12:56:39  
Ok, so it is the "images" directory you want to upload to so you don't have to change anything.
The cart assumes that if you are uploading product images you are uploading them to the /prodimages directory, but if you are uploading an image for another reason then you want to upload that to the /images directory. So just go to the categories admin page for instance, click the button to create a new category and use Froala there to upload the images and now the /images category will be used. Then just don't "submit" the changes on the category page.
Really though, getting to grips with an FTP program might be easier (I use the free program FileZilla for instance). If we can help with that please let me know.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/07/2019 :  13:07:06  
I understand how to upload files to my site. I use Dreamweaver or Coda on my Mac.

The problem is that I can't use the insert image widget in the Froala editor. In the past it would allow me to select a file from my local disk, or add a url to a file already uploaded, but lately neither of these approaches have worked. I have had limited success using the editor code view, and "hand coding" the link.

Edited by - John Nolan on 10/07/2019 13:11:20

Vince
Administrator

42428 Posts

Posted - 10/08/2019 :  01:10:53  
quote:
but lately neither of these approaches have worked.
Do you get an error when you try to do this now, John?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/08/2019 :  02:43:03  
Yes, I still get "Something went wrong, try again".

And, I find in my cPanel errors panel:
[Tue Oct 08 03:42:17.341051 2019] [lsapi:notice] [pid 1379:tid 47088096286464] [client 185.93.229.6:22798] [host www.ragandbone.ca] Backend log: PHP Warning: move_uploaded_file(): Unable to move '/tmp/phpvKJLrt' to '/home/jnolan/public_html/prodimages/canoe.png' in /home/jnolan/public_html/boxoffice/vsadmin/froala/lib/FroalaEditor/Utils/DiskManagement.php on line 70\n, referer: https://www.ragandbone.ca/boxoffice//vsadmin/adminemailmsgs.php

Edited by - John Nolan on 10/08/2019 05:14:30

Vince
Administrator

42428 Posts

Posted - 10/08/2019 :  08:03:51  
Hi John
Is this just because the prodimages directory has lost write permissions? Can you log in via FTP and check what the permissions are on that directory?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/08/2019 :  08:13:41  
I don't know too much about permissions.

I see rwxr-xr-x on that folder.

Ah! I think I see the problem....I was adding a file with the same name as a previously uploaded graphic. When I change the name, I can add a graphic. I guess it couldn't overwrite the file!

Edited by - John Nolan on 10/08/2019 08:17:52

Vince
Administrator

42428 Posts

Posted - 10/08/2019 :  08:16:21  

John Nolan
Advanced Member

Canada
406 Posts

Posted - 10/08/2019 :  08:25:44  
I've change the permissions as well.
Page: of 2 « Topic »  
Next Page
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.05 seconds. Snitz Forums 2000