back to phpList.org

Saving template after uploaing images causes template not to be saved

Hello,

We have been using PHPList for a few months not to send our newsletters. It has worked fine.

We recently got an eror:
"Image browsing is not available because directory “…/public_html/lists/uploadimages”

After reading through the forums, I realized a folder “images” was needed in the directory where PHPlist is located. So, I added it.

WE were then able to proceed and add the photos with otu having the error.

But, now when saving the images, I go back to the page that asks to enter a new template. The page has no trace of me add a template of images.

What might be causing this?

Thanks

Joseph

No, it indicates that the directory “uploadimages” is needed. But it is better to keep that directory outside of the phplist code, which makes updating phplist simpler. The directory is controlled by the setting UPLOADIMAGES_DIR in config.php.

Hello Duncan,

Thanks for the reply, and explination.

But, I did see this in one of your previous answers. But, I did not find the UPLOADIMAGES_DIR directory in config.php. I found it in in the file:

config_extended.php

Where do I want to confirm the folder location?

config or config_extended??

Thanks

Joseph

@smokinjo You need to make changes to config.php. This is explained at the beginning of the file.

OK, that makes sense. I will be honest, and say that I did not know what the “extended” was for. Until now:)

Now, it says to copy it, as you confirmed.

Where do I put it?

There is t emain section for the connection t the DB.
There is also the section for the mailing of the message.
There is th esection for hanlding bounces.

Or, maybe just at the end?

Thanks

@smokinjo the location does not matter but at the end makes it easier to see settings that have been added.

Hello again. Things are progressing, I think:)

I did not notice that you have to check off the three things after the body of the template:
Check that all links have a full URL
Check that all images have a full URL
Check that all external images exist

I then checked the off.

After trying to save, it showed the errors in the code of the template:
Errors after saving:
Image images/55901595937351573.jpg => not full URL
Image images/50431595938948520.jpg => not full URL
Image images/50101595938963977.jpg => not full URL
Image images/50041595938975346.jpg => not full URL

Copde for the template:
src=“images/55901595937351573.jpg”

I did not make the template. But, the way that it is written, it seems to be looking for the folder with in the PHPList folder.

Another note. I can understand that the links do not work. Is it also normal that none of the images uploaded into the uploadimages folder?

Thanks for any help.

Joseph

You need to use full URLs in the template because relative URLs do not make sense in an email. I think that phplist might try to convert relative URLs to full URLs when it creates each email to be sent but it is probably simpler to use full URLs to begin with.

I don’t understand this.

I suspected this. I will get the template fixed.

I don’t understand this
[/quote]

This was in reference to when you upload the images. After I “uploaded” the images, I expected to see copies of the in the uploadedimages folder. They are not there.

Are they not there because the URLs are wrong? If not, why might the uploading of the images not work?

Thanks

@smokinjo If you changed the config setting after uploading images then they are probably in the wrong place now. Try uploading an image again.

Just to make sure I understand.

In my UPLOADIMAGES definition, is “images”.

Does this mean that it is the main root directory of the domain? (I put images in the root directory of my domain)

I tried again. Then I tried again after rebooting apache, thinking that it might reload things.

No images are uploaded.

If I upload the images manually (just for testing purposes), if I change the image SRC to the full URL, my newsletter should work, right?

Thanks for any feedback.

Joseph

Just a quick update.

I went in and changed all the URLs to full URLs.
I then uploaded via FTP the images to the folder indicated in the URL.

I look at my template in a browser, and the document looks perfect.

So, the template and images work.

I just need to figure out how to get PHPList to add the images to the right folder.

Thanks for all ideas.

Joseph

@smokinjo It wasn’t clear to me exactly what you were doing. The image browser/uploader in the phplist editor stores images in the ‘image’ subdirectory of the directory identified by UPLOADIMAGES_DIR.

If you want to use ftp to upload images and then browse those within phplist then you need to upload into the ‘image’ subdirectory.

Hello Duncan,

Thanks for confirming that the “images” subdirectory identiued by the UPLOADIMAGES_DIR is where the files are uploaded.

So, my UPLOADIMAGES_DIR is defined correctly. As you suggested, I put the define(‘UPLOADIMAGES_DIR’, ‘images’); line in my config.php at the end of the file. The folder itself i slocated at the main directory of the domain.

But, when uploading the images, the images were not being uploaded.

That is why I added the images by FTP, just to test the template.

I do not want to have to do it this way in the future.

So, the question remains, why do the images not upload? What can I look at to fix this?

Thanks very much

Joseph

No, you misunderstand. The phplist image browser looks in “/images/image” directory. Try uploading an image using the image browser, then use ftp to confirm where the image has been placed.

OK, I did misunderstand. Thanks for pointing that out.

I will empty our the images folder and the image folder, leaving the folders intact.

I will start again.

Thanks

Hello,

I removed all my images, so that I could upload them again.

I can save the template. Then, I go and check up that the URLs for images and links are all good.

I save it again, but it does not ask me to upload the images like it did before. It skips that part and goes to give me the error that the images are not there.

I did not touch the config files defining the upload folder.

@smokinjo You are now raising different problems to the original one about the image directory. Just leave those checkboxes unchecked, then send a campaign with that template to see whether it is working.

OK, I sent a test campaign. It works fine. I get the email, with no images.

@smokinjo Yes but you just said that you had deleted the images. What did you expect if you didn’t upload the images again?

Sorry but I don’t think that I can help with this any longer.