Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-12-11 22:02:27

abner-01
New Member
Registered: 2016-12-11
Posts: 2

Not seeing image included in article

I am a new textpattern user so please forgive my ignorance. I am running textpattern version 4.5.7. My problem is that I am trying to insert an image into an article. I uploaded the image which is showing as ID# 10 on the /Content/Images page. I can also find the image under the directory /var/www/html/images/10.jpg and it seems to have the same ownership and permissions as all the other images (ie www-data:www-data and 644).

I include the following code in my article:

<txp:images id=“10” />

I publish the article (I have tried draft and live with the same result). When viewing the page after it was published to Live there is a broken image icon with the alternate text associated with the image displayed.

When I inspect the broken image in Chrome I find the following information under Elements in Chrome:
<img src=“http://www.abnergershon.com/images/10t.jpg” alt=“Images of Dr. Abner Gershon etc”> == $0

I don’t know why this shows …/images/10t.jpg rather than /images/10.jpg which would be the correct file name.

There is a similar result when viewed using Mozilla Firefox.

The following is from my Textpattern Diagnostics page (using Detail: Low)

Textpattern version: 4.5.7 (r5900)
Last update: 2016-05-23 13:50:55/2014-09-21 07:22:08
Document root: /var/www/html
$path_to_site: /var/www/html
Textpattern path: /var/www/html/textpattern
URL pattern: messy
Temporary directory path: /tmp
Site URL: www.abnergershon.com
PHP version: 5.6.20-0+deb8u1
GD Graphics Library: unavailable
Server TZ: America/New_York
Server local time: 2016-12-11 16:57:40
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 1
Time zone: America/New_York (-18000)
MySQL: 5.5.49-0+deb8u1
Locale: en_US.UTF-8
Server: nginx/1.10.0
PHP server API: fpm-fcgi
RFC 2616 headers: 0
Server OS: Linux 3.16.0-4-amd64
Admin-side theme: hive 4.5.7

Pre-flight check: 
------------------------
New Textpattern version 4.6.2 available for download.
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority, 
------------------------

This is the first time I have tried using an image in an article but I note that images do display correctly on my homepage.

Any help would be much appreciated.

Offline

#2 2016-12-12 00:13:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,079
Website

Re: Not seeing image included in article

Have you tried with @<txp:image id=“10” /> ?

I’m not sure why <txp:images /> use the thumbnail image, honestly. That is not documented.

(note: without the “s” in image)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2016-12-12 01:55:34

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Not seeing image included in article

It does seem strange that you get a thumbnail with <txp:images />, but as Philippe said, you probably want to use <txp:image id=“10” /> rather than the <txp:images /> tag which is for a series for images.

Offline

#4 2016-12-12 02:24:43

abner-01
New Member
Registered: 2016-12-11
Posts: 2

Re: Not seeing image included in article

Thank you phiw13. As usual the devil is in the details. I tried <txp:image first but did not see the image in the preview mode. Little did I know that the preview mode does not apparently show any images. Then I switched it to <txp:images which shows the thumbnail which I did not upload. I updated the code back to <txp:image … and now the image is visible either when published as Live or when I click on View regardless of the status. Thanks again.

Offline

#5 2016-12-12 17:18:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Not seeing image included in article

The <txp:images /> tag — without form or container — assumes you’ll want a gallery of thumbnails is its default output. That is why you see the ‘t’ versions (‘t’ designates thumbnail). The thumbnails are automatically created for you when you upload images, unless you decide to switch off that feature.

If you want to control the output of the tag, either pass control of each image to a Form using the form attribute, or wrap an open-closing pair of <txp:images ...>each image runs this code</txp:images> tags around some content to display that for each matching image.

Hope that clears things up.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB