Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#451 2020-03-06 23:33:49

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

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

Unfortunately, it isn’t working for me, either.

http://presidents.cmsstyles.com/smd_tags/article/orci


Textpattern version: 4.8.0 (3a700fa86044132fa6b97439de8272c7)
Last update: 2020-02-25 19:00:47/2020-02-25 18:59:16
Textpattern path: __TXP-ROOT/textpattern
Article URL pattern: section_id_title
Production status: debug
Temporary directory path: __TXP-ROOT/textpattern/tmp
PHP version: 7.4.3
GD Graphics Library: bundled (2.1.0 compatible); Supported formats: GIF, JPEG, PNG.
Server timezone: America/Los_Angeles
Server local time: 2020-03-06 15:21:15
Daylight Saving Time enabled?: 0
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): America/New_York (-18000)
MySQL: 5.7.28-log (Source distribution) 
Database server time: 2020-03-06 15:21:15
Database server time offset: 2 s
Database server timezone: SYSTEM
Database session timezone: SYSTEM
Locale: en_GB.UTF-8
Site / Admin language: en-gb / en-gb
Web server: Apache
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 4.14.117-grsec-grsec+
Admin-side theme: hive 4.8.0
Active plugins: 
	com_connect-4.6.0
	csb_if_newer_than-1.0 (modified)
	etc_date-0.3
	pax_grep-0.2.3
	rah_replace-0.4.2
	smd_tags-0.7.0
	smd_thumbnail-0.5.3

Offline

#452 2020-03-07 10:22:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,423
Website GitHub

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

Drat. This is weird. See, it works perfectly on a brand new install. Filters stuff like a charm. But I put it on my already populated dev environment and it 404d every time.

However, since my dev site is an utter mess and does odd things sometimes, I put it down to this and released the plugin anyway. Seems maybe that was premature.

Sorry for the false start. I’ll have to see if I can figure out what’s going on. Maybe between Oleg and I we can suss out what’s making it fail and fix the plugin and/or Txp.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#453 2020-03-07 13:27:39

saccade
Plugin Author
From: Neubeuern, Germany
Registered: 2004-11-05
Posts: 521

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

just for the record: also 404d every time.

Offline

#454 2020-04-04 21:41:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,181
Website GitHub

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

Also for the record with 0.7.0, the links generated by the plugin:

www.domain.com/triggersection/tagname -> 404
www.domain.com/triggersection/article/tagname -> 404

but messy links work:

www.domain.com/triggersection/?smd_tag=tagname -> works
www.domain.com/triggersection/?smd_tag_type=article&smd_tag=tagname -> works

where the trigger section is set up in txp and has no articles of its own.

One more info: with PHP 7.4.2 I get:

Error in Tag: <txp:smd_related_tags section="blog" type="article" wraptag="" break="" form="blog_listentry" /> -> Notice: Trying to access array offset on value of type null beim Verarbeiten des Bausteins Keine auf der Seitenvorlage default

but not with PHP 7.3.9.


TXP Builders – finely-crafted code, design and txp

Offline

#455 2020-04-04 23:36:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,423
Website GitHub

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

Right, thanks for the nudge. I need to find a fix for this somehow, between the plugin and Txp. Can’t figure out why it works okay on a brand new install and not on an existing site, both with bleeding edge -dev code. Weird. I’ll give it some kicking.

Also, do you happen to have more detail such as a plugin line number in debugging mode for the PHP 7.4.2 error? That sounds like something isn’t set and I should defend against it, but I’m unsure where to start looking. Thank you.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#456 2020-04-05 09:03:24

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,181
Website GitHub

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

Bloke wrote #322490:

Right, thanks for the nudge. I need to find a fix for this somehow, between the plugin and Txp. Can’t figure out why it works okay on a brand new install and not on an existing site, both with bleeding edge -dev code. Weird. I’ll give it some kicking.

Sorry. Is there any way to usefully compare the conditions of existing and new installations to see what differs?

Also, do you happen to have more detail such as a plugin line number in debugging mode for the PHP 7.4.2 error?

Yes, gargle shows that error message with other systems also in combination with PHP 7.4.2. The error message itself isn’t very informative:

smd_related_tags()
textpattern/vendors/Textpattern/Tag/Registry.php:141 call_user_func()
textpattern/lib/txplib_publish.php:541 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:447 processTags()
textpattern/plugins/smd_tags/smd_tags.php:3710 parse()
smd_if_tag_list()
textpattern/vendors/Textpattern/Tag/Registry.php:141 call_user_func()
textpattern/lib/txplib_publish.php:541 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:447 processTags()
textpattern/publish/taghandlers.php:4266 parse()

In tag trace it occurs directly after:

[smd_related_tags matches: tagname]

and before the SQL statement:

SQL: SELECT SQL_CALC_FOUND_ROWS txp.ID, Posted, Expires, AuthorID, LastMod, LastModID, txp.Title, Title_html, Body, Body_html, Excerpt, Excerpt_html, Image, Category1, Category2, Annotate, AnnotateInvite, comments_count, Status, textile_body, textile_excerpt, Section, override_form, Keywords, txp.description, url_title,custom_1,custom_2, uid, feed_time, unix_timestamp(Posted) as uPosted, unix_timestamp(LastMod) as uLastMod, unix_timestamp(Expires) as uExpires, COUNT(smt.name) as tag_sum FROM textpattern AS txp
                LEFT JOIN smd_tags_used AS tu ON txp.id = tu.item_id
                LEFT JOIN smd_tags AS smt ON tu.tag_id = smt.id
                WHERE tu.type = 'article' AND txp.Status IN (4) AND txp.id != "" AND txp.Section IN ('blog') AND smt.name IN ('tagname') GROUP BY txp.id ORDER BY Posted desc LIMIT 0,99999 ]

Thereafter the found rows are shown and put into [smd_related_tags article records: Array….

Not sure if that’s a great help. MAMP’s PHP log doesn’t list the error (I guess because it’s a notice).


TXP Builders – finely-crafted code, design and txp

Offline

#457 2020-04-05 15:43:54

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,181
Website GitHub

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

Another minor report. I get the following error when deleting a tag that is already assigned to an article via the “Manage Tags” pane:

User_Error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1"
in /Users/me/Sites/site_name/textpattern/lib/txplib_db.php at line 450.

The error doesn’t occur as far as I can tell when deleting an unused tag.


TXP Builders – finely-crafted code, design and txp

Offline

#458 2020-04-07 21:18:42

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 209
Website

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

Hi. I got the same. Works only with messy links and it is a new installation with no other plugins besides smd_tags

jakob wrote #322488:

Also for the record with 0.7.0, the links generated by the plugin:

www.domain.com/triggersection/tagname -> 404
www.domain.com/triggersection/article/tagname -> 404

but messy links work:

www.domain.com/triggersection/?smd_tag=tagname -> works
www.domain.com/triggersection/?smd_tag_type=article&smd_tag=tagname -> works

where the trigger section is set up in txp and has no articles of its own.

Offline

#459 2020-04-08 06:50:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,181
Website GitHub

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

robhert wrote #322544:

Hi. I got the same. Works only with messy links and it is a new installation with no other plugins besides smd_tags

Hi robhert, my ‘for the moment’ temporary solution for this was to add the following line to the .htaccess file before the first RewriteCond … REQUEST FILENAME line:

# Temporary: smd_tags theme rewrite
RewriteRule ^triggersection/(article/)?(.+)$ index.php?s=triggersectiond&smd_tag=$1

replacing triggersection (in the first ‘from’ part and the second ‘to’ part) with the section you designated as the trigger word in your smd_tags settings.

That catches the 404 article tag links and redirects them invisibly to your target page.


TXP Builders – finely-crafted code, design and txp

Offline

#460 2020-04-08 19:05:43

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 209
Website

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

Hi Jakob! It works!

Just deleted the last “d” in the second triggersection (was triggersectiond)

# Temporary: smd_tags theme rewrite
RewriteRule ^triggersection/(article/)?(.+)$ index.php?s=triggersection&smd_tag=$1

In my case is:

@RewriteRule ^etiqueta/(article/)?(.+)$ index.php?s=etiqueta&smd_tag=$1

Thank you Stef and Jakob!

jakob wrote #322547:

Hi robhert, my ‘for the moment’ temporary solution for this was to add the following line to the .htaccess file before the first RewriteCond … REQUEST FILENAME line:

# Temporary: smd_tags theme rewrite...

replacing triggersection (in the first ‘from’ part and the second ‘to’ part) with the section you designated as the trigger word in your smd_tags settings.

That catches the 404 article tag links and redirects them invisibly to your target page.

jakob wrote #322547:

Hi robhert, my ‘for the moment’ temporary solution for this was to add the following line to the .htaccess file before the first RewriteCond … REQUEST FILENAME line:

# Temporary: smd_tags theme rewrite...

replacing triggersection (in the first ‘from’ part and the second ‘to’ part) with the section you designated as the trigger word in your smd_tags settings.

That catches the 404 article tag links and redirects them invisibly to your target page.

p.

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,423
Website GitHub

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.

Hire 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: 12,423
Website GitHub

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.

Hire 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: 5,181
Website GitHub

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: 12,423
Website GitHub

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.

Hire 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: 5,181
Website GitHub

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

Board footer

Powered by FluxBB