Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2018-09-08 18:10:19

singaz
Member
From: Kyiv
Registered: 2017-03-12
Posts: 145

Re: Testers needed: flat development (4.7+ only)

Here is the working configuration

page template:

<?xml version="1.0" encoding="UTF-8"?><txp:header value="application/xml; charset=utf-8" />
<urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
<txp:section_list break="" exclude="sitemap,info">
<url>
    <loc><txp:section url="1" /></loc>
<txp:evaluate test="article_custom">
    <lastmod><txp:article_custom section='<txp:section />' limit="1" sort="LastMod desc"><txp:modified format="%Y-%m-%d" /></txp:article_custom></lastmod>
</txp:evaluate>
</url>
</txp:section_list>
<txp:article_custom section="sections1,sections2,sections3" limit="9999">
<url>
    <loc><txp:permlink /></loc>
    <lastmod><txp:modified format="%Y-%m-%d" /></lastmod>
</url>
</txp:article_custom>
</urlset>

with such file .htaccess works www.mydomain.com/sitemap.xml:

# BEGIN Textpattern
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteBase /relative/web/path/
# sitemap rewrite
    RewriteRule ^sitemap.xml$  index.php?s=sitemap [L]
	RewriteCond %{HTTPS} !=on [OR]
	RewriteCond %{HTTP_HOST} ^www\. [NC]
	RewriteRule ^(.*)$ https://mydomain.com/$1 [R=301,L]
    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
<IfModule mod_mime.c>
    AddType image/svg+xml  svg svgz
    AddEncoding gzip       svgz
</IfModule>
# END Textpattern

Thank you all!


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#134 2018-09-08 20:14:49

etc
Developer
Registered: 2010-11-11
Posts: 4,188
Website

Re: Testers needed: flat development (4.7+ only)

Pat64 wrote #313929:

I’m using pat_speeder v1.1 with my build-in sitemap (as you try to accomplish) without any kind of problems: https://www.cara-tm.com/sitemap-xml

Hi Patrick, no offense intended, that just was the only plugin in Yiannis list that alters the page output, hence an easy suspect, sorry. Also, from what I’ve understood, you need to put it at the very beginning, so an eventual linebreak after it invalidates XML.

This makes me think that we should trim the final page output before serving it. I don’t see why anyone would need to start his pages with a space or a linebreak. Edit: done.

Offline

#135 2018-09-09 06:05:32

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: Testers needed: flat development (4.7+ only)

I do not know if it helps, but in the backend, all screens have this extra white character, except the plugins screen.

Offline

#136 2018-09-09 06:38:47

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: Testers needed: flat development (4.7+ only)

I put all the 4.7.1 files on the server: same problem.

This makes me think that we should trim the final page output before serving it. I don’t see why anyone would need to start his pages with a space or a linebreak. Edit: done.

But I uploaded the latest version 4.7.2 with the latest Oleg commits: same problem
I also changed the theme, returning to Hive: always the same thing.
Every time I emptied the cache of FFox and reloaded the pages.

Offline

#137 2018-09-09 06:46:01

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,264
Website

Re: Testers needed: flat development (4.7+ only)

jpdupont wrote #313937:

I put all the 4.7.1 files on the server: same problem.

But I uploaded the latest version 4.7.2 with the latest Oleg commits: same problem
I also changed the theme, returning to Hive: always the same thing.
Every time I emptied the cache of FFox and reloaded the pages.

Weird. On my various installs, locally or live servers, there is no white-space character before the <!doctype…> on the admin side (or the front-end). Have you tried disabling plugins to see if that changes anything? (and you did check ‘view source’, right?)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#138 2018-09-09 06:54:45

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: Testers needed: flat development (4.7+ only)

Yes, I check view source.

I just put the site in work mode and i try now to disable the plugins.

Offline

#139 2018-09-09 07:22:17

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 752
Website

Re: Testers needed: flat development (4.7+ only)

That’s it, I found the culprit!

It’s the mck_snippet plugin that I liked to use to store texts that should not be mixed with articles.

Something that is missing in Textpattern, and that could find its place next to other “media”: files, images, links …
I’m going to do without it, and he goes to the trash …

Offline

#140 2018-09-09 07:26:22

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,264
Website

Re: Testers needed: flat development (4.7+ only)

jpdupont wrote #313940:

That’s it, I found the culprit!

Great! One step closer to nirvana.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#141 2018-09-09 09:35:15

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,467
Website

Re: Testers needed: flat development (4.7+ only)

etc wrote #313933:

Hi Patrick, no offense intended, that just was the only plugin in Yiannis list that alters the page output, hence an easy suspect, sorry. Also, from what I’ve understood, you need to put it at the very beginning, so an eventual linebreak after it invalidates XML.

This makes me think that we should trim the final page output before serving it. I don’t see why anyone would need to start his pages with a space or a linebreak. Edit: done.

Sure ;)

Thanks lot for the commit: as always you make great things for TXP!


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#142 2018-10-08 15:45:39

etc
Developer
Registered: 2010-11-11
Posts: 4,188
Website

Re: Testers needed: flat development (4.7+ only)

Custom (flat) assets management is slowly taking shape in 4.7.2. One can edit and use site components (js, css etc) as forms, defining their mimetype via a pref (currently in Advanced options section). This custom_form_types pref (in ini format) allows also for custom form types definition. Example:

[js]
mimetype="application/javascript"
[shortcode]
*="Short code"
es="Etiqueta corta"

will add js and shortcode to available form types.

As a consequence, easter eggs plugin is not needed anymore for these tasks.

Offline

#143 2018-10-08 17:56:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,542
Website

Re: Testers needed: flat development (4.7+ only)

etc wrote #314476:

… As a consequence, easter eggs plugin is not needed anymore for these tasks.

? Wonderful news!!! ?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#144 2018-10-09 15:14:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,086
Website

Re: Testers needed: flat development (4.7+ only)

etc wrote #314476:
[shortcode]
*="Short code"
es="Etiqueta corta"

I know the syntax has changed today but just on an i18n note, are we forcing people to specify language translations in this pref or can they be picked up via `gTxt()` somehow, perhaps via a well-known prefix? Just thinking it’d be easier for plugins/themes to add lang strings than cleanly merge their custom type definitions into the pref (unless there’s a companion API call to do it for them without duplicating existing mime types that may have been defined by hand?)


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