Images Not Showing When Editing In tinyMCE
Images do not display when editing a content block. I see them on the page after they are added and saved but they are not showing while editing, only a missing image icon.
From searching the forums I have tried:
Clearing the cache
Make sure there are no spaces in config/site.php
- I notice there is no ending ?> in config/site.php and many other files. Is this a problem?
Replaced the entire core with files from a working site. No good.
I am not sure when this happened. The editor did once work.
concrete5 Version 18.104.22.168
URL of images while working in the editor:
<img src="/hodan/index.php/download_file/view_inline/56/" alt="80x100.gif" width="80" height="100" />
URL of image when viewed on website:
In Internet Explorer and Safari I get a broken image box that is the size of the image, not good but useable. In Firefox I get a default thumbnail size broken image box. I could live with that but this site is for a client.
I did change the Alternate Storage Directory. I would like to remove that alternate directory but it looks as if there is no way to do that. I can create a new directory but not I can not leave it blank.
Thank you in advance for any help offered! Chuck
It's fine that some of the php files are missing the closing ?>. PHP complains loudly when there are spaces after the closing ?> but if you leave the closing tag off, the server will automatically add the ?> right after the last space in the code so you avoid this problem.
As for your missing images, is it possible that this is a server permissions issue because I tried to browse the image link you posted and I come up against a password protected site. I've never had this happen so it's just a guess.
As for the Alternate Storage issue, you need to add the default back into the top box but it's not easy to find out what the default is. I did a little experimenting and found that this line of code will echo what needs to go in that box. Temporarily place this line of code just below the <body> tag of your theme file and it should show up when you view the page or you might need to find it with 'view source':
<?php echo $_SERVER['DOCUMENT_ROOT'].'/files';?>
Cut 'n paste the echoed output into the top box on the Alternate Locations dialog and see what happens.
Sorry, forgot I had password protected the site to keep people/google from finding it and thinking it was their current website.
Password and Username are both: Hodan
I removed the password protection for a test and that did not solve the image issue. The images were working a few days ago, even with the password protection turned on but not now. I am thinking it is something I did while making the theme. This is my first concrete website...
I am making a new install and adding my styles a bit at a time until I find what caused the problem. If anyone else has any ideas I sure would appreciate hearing them!
On the File Storage Locations. The default path is displayed in the same dialog box where you enter the alternate. I did what you say but that comes up with a directory that is outside of public_html/hodan where the concrete5 website is located. I put that path in anyway and concrete5 created a /files folder in my website root, outside of the installation. It appears that the default would be hodan/files but when I put that in and check a file in file manager I get the two choices, both the same location. I suppose that is not a big deal but I thought this might possibly be the cause of my issue with images not showing when I edit a content block.
You can install this free add-on that gives you easy access to your database from your dashboard.