Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Permanent link modus /section/title doesn't render /images ... !?
Never had this weird problem. If the Permanent link modus is set /section/title then certain images from the images folder aren’t rendered. If the Permanent link modus is set /section all is well. So I thought maybe I have to make a releative path to the images folder the same as to the up/downloads folder, but that doesn’t help.
URL (that shows what’s wrong): /portfolio/minder-is-meer
URL (that shows how it should be): /portfolio
Txp: v4.2.0 (oldie)
And this is the tag(soup) on that page that should render the (article)images:
<txp:if_individual_article>
<txp:article_custom section="portfolio" sort="position asc" limit="12">
<txp:if_first_article><ol class="titles"></txp:if_first_article>
<li<txp:if_article_id> class="active"</txp:if_article_id>><txp:permlink class="portfolio"><txp:article_image /></txp:permlink></li>
<txp:if_last_article></ol></txp:if_last_article>
</txp:article_custom>
<txp:else />
<txp:article_custom section="portfolio" sort="position asc" limit="12">
<txp:if_first_article><ol class="titles"></txp:if_first_article>
<li<txp:if_first_article> class="active"</txp:if_first_article>><txp:permlink class="portfolio"><txp:article_image /></txp:permlink></li>
<txp:if_last_article></ol></txp:if_last_article>
</txp:article_custom>
</txp:if_individual_article>
What’s happening here? Or have I run into a .htaccess thing?
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
Last edited by RedFox (2013-10-04 15:12:06)
Offline
#2 2013-10-04 15:47:25
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Permanent link modus /section/title doesn't render /images ... !?
The code is ready and OK, the paths are wrong, they’d work if they were like this one: /images/110t.jpg
.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Permanent link modus /section/title doesn't render /images ... !?
Thanks for helping @uli … maybe it’s a stupid question, but what can I do to make the paths oké?
Offline
#4 2013-10-04 17:55:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Permanent link modus /section/title doesn't render /images ... !?
More important: why would the article_image tag create a URL like images/1t.jpg
? It should use the full image URL.
There also seems to be something wrong with your menu links, the missing trailing slash in the section(?) links causes links to appear like /portfolio/contact, /portfolio/default etc. Did you handcode it instead of using txp tags?
Are you using gbp_permanent_links?
Last edited by els (2013-10-04 18:00:41)
Offline
Re: Permanent link modus /section/title doesn't render /images ... !?
Els wrote:
More important: why would the article_image tag create a URL like
images/1t.jpg
? It should use the full image URL.
Tell me … !?
There also seems to be something wrong with your menu links, the missing trailing slash in the section(?) links causes links to appear like /portfolio/contact, /portfolio/default etc. Did you handcode it instead of using txp tags?
Yes, the nav is handcoded (a long time ago) … with <txp:site_url /> implemented the / thing is solved … :)
Are you using gbp_permanent_links?
Nope!
[edit]
The strange thing is that everything was working fine until I changed (why … !?) the Permanent link status (Prefs) into /section/title … because only /section isn’t giving any troubles … !?
Last edited by RedFox (2013-10-04 18:23:16)
Offline
#6 2013-10-04 20:33:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Permanent link modus /section/title doesn't render /images ... !?
Joop, I don’t think the code you posted is the code that is rendering the images… <txp:article_image />
without the thumbnail
attribute wouldn’t display thumbnails…
Offline
Re: Permanent link modus /section/title doesn't render /images ... !?
Oh boy, after 10 years now I do know how to use article_image tags properly … :/
Don’t do this:
But do this:
And in this case I must tell Txp to use the thumbnail: <txp:article_image thumbnail="1" />
And … the site is working correctly with Permanent link modus set to /section/title … :)
Thank you Els and Uli …
Last edited by RedFox (2013-10-05 05:55:46)
Offline
#8 2013-10-05 12:34:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Permanent link modus /section/title doesn't render /images ... !?
Ah, I didn’t think of the article image field. Glad you found it :)
Offline
#9 2013-10-05 12:36:14
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Permanent link modus /section/title doesn't render /images ... !?
Ah, a path! I couldn’t imagine what might have caused these URLs. Nice that you posted the reason, users often don’t like to expose their faulty steps, thus letting others do the same.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline