Welcome! To use this support forum, please Login or Join Today!

You are here → Home :: Forum Home :: General WordPress :: WordPress :: Thread

   

Onyx Theme - Broken Image Links

{name}
Rank

Total Posts: 15

Joined 2011-12-08

PM

 
When I attempt to use shortcodes, links to what appear to be theme-related graphics are broken. See attached image. How do I resolve this? Perhaps I don't understand how to use this feature? :-)

Thank you.

Image Attachments

Onyx_Broken_Image_Links.png

Click thumbnail to see full-size image

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 
I've seen this once before. I assume you mean the content templates...

Are the images visible in your editor when editing the article?
Are you running WordPress on a subdomain or a subfolder?
What theme does this occur in?

You can edit the article in source view and add your domain name in front of the reference to wp-content image source.
{name}
Rank

Total Posts: 15

Joined 2011-12-08

PM

 
Thank you for your reply.

Yes...the content templates.

Yes, all images appear correctly when editing the WordPress page using the standard WP editor. The broken image link appears when you choose to "visit the site".

WordPress is installed in a sub-folder off of the root level of the website/domain name.

You are correct. If I manually edit the HTML code, and add the sub-folder name, the problem goes away. The images appear correct when viewed at the "public" level (not editor). However, after manually editing to adjust the path, the image now appears broken when editing the WP page. See attached image file.

So the problem has basically "flipped". Fixed the original problem but now the same problem occurs in the editor.

If it's a path issue (so to speak), I wonder where I need to edit the image path so it's a global fix? Thank you.

Image Attachments

brokenimage2.png

Click thumbnail to see full-size image

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

If it's a path issue (so to speak), I wonder where I need to edit the image path so it's a global fix? Thank you.


The content templates feature assumes you'll replace the default images with icons or images of your own. If you use the WordPress image insert button, the paths should be correct.

Nevertheless, there is a workaround. You could change the content template code by opening in a text editor:

/wp-content/themes/onyx/lib/admin/tinymceContent/tinymce.js

Find all instances of ../wp-content/ and replacing with http://yourdomain.com/subfolder/wp-content/.

The problem with this is that if you are working on a staging server and plan to move it to a domain root later on, then you'll have to revert to the old version so I'd suggest duplicating and backing up the original version if this is the case.

Hope this helps.
{name}
Rank

Total Posts: 15

Joined 2011-12-08

PM

 
You were right on target. I was far enough along with converting my website from Joomla to WordPress, that I decided to go ahead an repoint the domain name. Once that was done, the images within the WP editor and from the public view worked fine.

Thank you.