Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2017-03-17 20:47:31

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,616
Website

Re: newbie issues (?) - what is wrong with my forms?

Sound advice from Uli as always! You might want to try looking at:

  • this txp tip for the date archive tree with article counts (it uses a little trick to do the article counts, so needs to output the individual article titles. You could show/hide them with css if you don’t want them to show).
  • and this thread for the menu of article categories with articles in them. If you are only using Category1 to category your articles, you can go with one of the simpler versions near the top of the thread.

TXP Builders – finely-crafted code, design and txp

Offline

#26 2017-03-18 09:48:44

sgw
Member
Registered: 2012-12-18
Posts: 59

Re: newbie issues (?) - what is wrong with my forms?

thanks Uli and Jakob

did some trial and error on my “blog” page, looks somehow ok now, right?
Although even after upgrading rah_metas I get this after clicking a blog entry:

Fehler im Tag: <txp:rah_metas words=“15” /> -> Textpattern Notice: unregistered_tag beim Verarbeiten des Bausteins header auf der Seitenvorlage blog

checked help, syntax looks ok to me.

searching for pap_contact_cleaner 0.1.2 now

Offline

#27 2017-03-18 10:18:09

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,616
Website

Re: newbie issues (?) - what is wrong with my forms?

The unregistered tag is currently just a warning and indicates that the plugin is from the times before the tag registry was introduced in textpattern. If you want to remedy the message, go into Admin > Plugins, edit the code of the plugin and add this to the top of the plugin code:

if (class_exists('\Textpattern\Tag\Registry')) {
	Txp::get('\Textpattern\Tag\Registry')
		->register('rah_metas')
	;
}

And that will add the tag name to the registry. The same goes for other plugins. You can add further ->register('abc_tag-name') lines for each public tag a plugin provides (you don’t need it for admin-side plugins).


TXP Builders – finely-crafted code, design and txp

Offline

#28 2017-03-18 11:24:25

sgw
Member
Registered: 2012-12-18
Posts: 59

Re: newbie issues (?) - what is wrong with my forms?

jakob wrote #304877:

The unregistered tag is currently just a warning and indicates that the plugin is from the times before the tag registry was introduced in textpattern. If you want to remedy the message, go into Admin > Plugins, edit the code of the plugin and add this to the top of the plugin code:

if (class_exists('\Textpattern\Tag\Registry')) {...

And that will add the tag name to the registry. The same goes for other plugins. You can add further ->register('abc_tag-name') lines for each public tag a plugin provides (you don’t need it for admin-side plugins).

done, works, cool! thanks :-)

Offline

#29 2017-03-18 16:22:24

sgw
Member
Registered: 2012-12-18
Posts: 59

Re: newbie issues (?) - what is wrong with my forms?

1. “blog” page modified (and others), doesn’t look that bad anymore.
Small question: clicking on “headlines” like “Gentoo” on http://www.oops.co.at/de/blog/ throws another error.

here the relevant part (IMO) of blog page:

<txp:if_individual_article>
<txp:article section="blog" limit="1" form="blog_article" />
<txp:output_form form="twitter" />

<txp:else />

<txp:article_custom limit="9999" section="blog" sort="category1, Posted" status="live">

<txp:if_different>
   <txp:category1 title="1" link="1" wraptag="h3" />
</txp:if_different>

<div class="entry">
   <txp:permlink><txp:title /></txp:permlink>
</div>

</txp:article_custom>

</txp:if_individual_article>

2. Another issue still with l10n: Content-Renditions still leads to a white page here …

3. and on “references” I managed to list my links but couldn’t get them separated in groups as they were before:

<div id ="primary-content">
		<div class="section">
			<h2>Clients</h2>
			<txp:linklist labeltag="h3" wraptag="ul" form="links" class="rule" />
		</div>
	</div>

I assumed labeltag would do that, no success so far (not that important, just a note).

thanks, have a peaceful saturday …

Offline

#30 2017-03-18 16:41:35

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: newbie issues (?) - what is wrong with my forms?

sgw wrote #304884:

here the relevant part (IMO) of blog page:

The error stems from the default page: Seitenvorlage default enthält keinen "txp:article"-Tag. You can safely ignore that if the content displayed is what you expect to see.
BTW: You can see which section uses which template (TXP-speak: Page) when looking at Presentation > Sections.

For the separated contents issue: You’ll need something like this in your form “links”:

<txp:if_different>
   <txp:TAG YOU WANT TO HAVE AS SEPARATOR />
</txp:if_different>

Last edited by uli (2017-03-18 16:42:11)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#31 2017-03-18 16:50:44

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: newbie issues (?) - what is wrong with my forms?

For the MLP issue you best ask in that topic.

The blog page might need some CSS love, like

.entry {
    padding-bottom: 0.5em;
    }

… cause the links there “adhere” to each other. Possibly caused when changing proprietary plugin code (with class) to TXP core tags (without).


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#32 2017-03-18 21:23:59

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

Re: newbie issues (?) - what is wrong with my forms?

sgw wrote #304884:

l10n: Content-Renditions still leads to a white page here …

Take your site out of Debugging / Testing mode and all will be fine. I think it’s an issue with the way MLP interacts with the new trace functionality that kills it. Haven’t found a fix yet.


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

#33 2017-03-20 08:45:11

sgw
Member
Registered: 2012-12-18
Posts: 59

Re: newbie issues (?) - what is wrong with my forms?

Bloke wrote #304894:

Take your site out of Debugging / Testing mode and all will be fine. I think it’s an issue with the way MLP interacts with the new trace functionality that kills it. Haven’t found a fix yet.

yes, that helps, thanks.

Offline

#34 2017-03-20 09:07:02

sgw
Member
Registered: 2012-12-18
Posts: 59

Re: newbie issues (?) - what is wrong with my forms?

uli wrote #304885:

For the separated contents issue: You’ll need something like this in your form “links”:

<txp:if_different>...

tried that without success.

pls advise, this is the content of the “Links” form (big L):

<li>
<txp:link rel="external" />
</li>

Offline

#35 2017-03-20 14:09:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: newbie issues (?) - what is wrong with my forms?

Have a look at if_different’s page in the tag documentation (please bookmark), especially example 2. Note that a) if_different can only take 1 TXP tag inside its container to work. b) the linklist tag needs a “sort” parameter that corresponds to the tag used inside if_different, i.e. if you want the result sorted by e.g. category, with category name separators, the linklist tag’s “sort” attribute must contain “category” and the if_different tag must contain the link_category tag.
Edit: Put the result of your considerations at the top of your L/links form.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#36 2017-03-20 16:15:15

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

Re: newbie issues (?) - what is wrong with my forms?

uli wrote #304939:

Note that a) if_different can only take 1 TXP tag inside its container to work.

That’s not strictly true. You can put whatever you want inside it — even many Txp tags — and if_different will only trigger if something inside its container differs from the last iteration. But you are correct insofar as the results might be a little unpredictable if you’re not careful, so for most cases one tag is plenty enough to avoid brain hurt!


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