Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#461 2020-04-09 00:42:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Good workaround with the .htaccess. That’s genius.

Weird, though. The plugin works without that hack in my tests under both 4.8.0 and 4.8.1-dev.

*scratches stubble*

EDIT: wait, you have altered your smd_tags plugin load order to be lower than 5, right? For reasons I have yet to ascertain, it doesn’t work if it’s 5 or higher.

Last edited by Bloke (2020-04-09 00:43:40)


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

#462 2020-04-09 09:15:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

@jakob. I think I’ve fixed the PHP 7.4.2 warning. I don’t have an environment with it installed, but this commit should improve things. Please test.

I’ll work on the admin-side issue you raised later, as I have a slew of corner case bugs to squish on the tag management panel.


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

#463 2020-04-09 10:25:51

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,892
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke wrote #322556:

@jakob. I think I’ve fixed the PHP 7.4.2 warning. I don’t have an environment with it installed, but this commit should improve things. Please test.

Yes, that seems to have resolved the notice with PHP 7.4.2. Thanks!!

Bloke wrote #322555:

wait, you have altered your smd_tags plugin load order to be lower than 5, right? For reasons I have yet to ascertain, it doesn’t work if it’s 5 or higher.

I didn’t know about that. I set the load_order in the database to 4 (and then later 1) and commented out the line in .htaccess but no luck. I even get a 404 for the trigger section (which is set up under Admin › Sections in txp), which I don’t get with the load order set to 5.

Is there anything I can do to help you?

Good workaround with the .htaccess. That’s genius.

It’s a bit simple. Really it should also deal with tags for images, links, etc.


TXP Builders – finely-crafted code, design and txp

Offline

#464 2020-04-09 10:52:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Huh, that’s totally bizarre. I have a stock 4.8.0 set up on MAMP, just the bleeding edge plugin code installed, with load order 4 (I neglected to mention that stipulation in the announcement post, oops, sorry).

I made two tag trees with a handful of tags in each, assigned randomly to a set of 6 articles. I’ve changed the tag landing page to just tags and made that a Section with a dedicated Page containing this code within its other HTML furniture:

<smd::if_tag_list>
    <smd::tag_list wraptag="div" break="br">
        <smd::tag_info item="indent" />
        <smd::tag_name link="1" title="1" wraptag="span" />
        (<smd::tag_info item="count" />)
        <smd::related_tags type="article" section="articles" wraptag="ul" break="li" />
    </smd::tag_list>
<smd::else />
    <smd::tag_list showall>
       <smd::tag_name link /> <smd::tag_count />
    </smd::tag_list>
</smd::if_tag_list>

In my default Form, I added this to display the assigned tags:

<smd::if_tag>
   <smd::tag_list>
      <smd::tag_name link /> <smd::tag_count />
   </smd::tag_list>
</smd::if_tag>

That’s it. I can navigate the tags, view the tag tree. And if I strip off the tag from the URL (or click the Tags section from the menu bar) I can see the entire clickable list of tags.

I haven’t messed with any of the permlink settings per section yet, so maybe if I do that it’ll start breaking. That’s next on the hit list.

Somewhere there has to be a reason why this is breaking on more established sites, because the above doesn’t work on a site I’ve had around for ages.

Do you have the luxury of being able to set up a vanilla install and at least verifying it does work as above in this environment? If not, there’s something else at play. If it does, well, we can then tinker with settings and stuff one thing at a time until it breaks and that might lead us to the answer.

Thank you, and sorry for the continued hassle this plugin is causing.


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

#465 2020-04-09 13:37:27

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,892
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Right, I did that and – with the load_order set to 4 – it does indeed work :-)

If it helps you, would it be useful to you to output certain variables from the respective txp sites in order to compare?


TXP Builders – finely-crafted code, design and txp

Offline

#466 2020-04-09 13:41:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Phew. So I’m not going entirely mad, thank you for the verification!

Anything you can output that might indicate a difference between the environments – URL schemes, Txp variables, structural differences – would be a massive help. There has to be something going on and it’s probably really simple. It’s doing my head in :-|


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

#467 2020-04-09 20:57:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,892
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

After exporting as csv, sorting and diffing some of the tables of the working and non-working sites I think I might have found a possible reason.

The non-working site has two sections set to /title only URL scheme (“impressum” and “suche”). It seems that was throwing it out. Switching them back to /section/title (or rather “Default”) and it works again!

I tried adding a “colophon” section with just /title url scheme to the fresh working installation, and indeed, you get a 404 for all the tags pages. I’m not sure if the others had a similar setup but maybe that helps locate the problem??

EDIT: Just tried out all the other url schemes. It seems /title is the only culprit.


TXP Builders – finely-crafted code, design and txp

Offline

#468 2020-04-09 21:21:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

jakob wrote #322565:

The non-working site has two sections set to /title only URL scheme (“impressum” and “suche”). It seems that was throwing it out. Switching them back to /section/title (or rather “Default”) and it works again! … Just tried out all the other url schemes. It seems /title is the only culprit.

Excellent sleuthing, thank you. That may indeed lead me to finding a solution. I shall run some tests and see if anything can be done about that.

Interestingly, on my dev site, I don’t have any section set to /title but I still get a 404 on any tag page, so maybe there’s something else at play in addition to what you’ve found. I’m hoping that maybe if I find the problem with the particular URL scheme you highlighted, the penny might drop and let me figure out what else is falling apart.


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

#469 2020-05-11 12:54:14

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

Hello,

I’d like to ask for help with smd_tag. I’ve read several recent pages of this thread and, to be honest, it’s confusing and way over my head, I am definitely not so much into “technical stuff”. But the plugin looks very appealing and I’d love to be able to use it on my website.

Textpattern version: 4.8.0
PHP version: 7.1.33
Plugin ver.: smd_tags_v.0.7.0_zip.txt

I am not sure if I get the following things right:

1. In TextPattern I’ve set:
Admin › Preferences › Site › Article URL pattern › /title

2. I should create a separate section for displaying particular tag-related articles – which should be displayed once I click on any particular tag. I understand it this way: my start page (“default” section) could display a list of recent articles, each article with its own tags. Once I click on any of those tags, the list (section “tags”) of all articles having this tag should be displayed.

3. Therefore I’ve created a section “tags” with “Article URL pattern” set to “/title”. It uses a page called “tags”, on which I’ve put this code:

<txp:smd_tag_list> <txp:smd_tag_name link=“1” title=“1” /> <txp:smd_related_tags section=“article” wraptag=“ul” break=“li”> <txp:permlink><txp:title /></txp:permlink> </txp:smd_related_tags>
</txp:smd_tag_list>

4. In the “Tag Preferenes” › “URL management” I’ve set:
“URL name parameter” › “smd_tag”
“URL type parameter” › “smd_tag”
“Trigger(s) for tag lists” › “tags”

Now, the result is that each tag is linked in the following way:

https://domain.com/tags/article/tagnamehere

and it leads to the error page (“error_default”).

Could anyone help me with that, please?

Offline

#470 2020-05-11 13:25:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,640
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Hi Thomas. Welcome to the forums, and sorry your first experience is with a slightly broken plugin.

Your setup sounds perfect and you’ve understood it all correctly. This issue is an unfortunate incompatibility between the plugin and Txp 4.8.0. Two things that might work to help address this situation:

  1. Change the plugin load order from 5 to 4 in the Admin->Plugins panel.
  2. If you possibly can, leave all your sections to use the Default permlink scheme. i.e. remove your /title designation for all sections in the Presentation->Sections panel.

That should fix your 404 woes. If it doesn’t, you have two further options:

  • Use an htaccess rule as suggested in this thread a little further up.
  • Install the dev copy of Txp 4.8.1 from GitHub. Though there is no specific fix yet for the permlink issue, there are a number of general improvements which might help. We’re anticipating 4.8.1 to be released very soon, so the code is considered stable enough for production usage. Once the permlink bug is ironed out, 4.8.1 is ready to go.

Hope that helps, and sorry again for the hassle.


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