Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Duplicate content
Ha ha! Friday afternoon. My internet is slow, I can’t view your videos yet, Yiannis, but this is making me laugh.
I tried the zem-redirect plugin but there are no instructions except for paying customers at threshold state, which no longer exists.
Perhaps we have crossed wires about Oleg’s code. I have been referring to
<txp:evaluate query='"<txp:site_url trim="/" /><txp:page_url type="req" />" != "<txp:page_url context />"'>
<txp:txp_die status="404" />
</txp:evaluate>
I use that in my head (Edit: in the head of my page, not just in my own head which is also full of this stuff now!:-) along with Phil’s 4.8.1 TXP head code.
Regarding Oleg’s code when answering your slightly different question, Yiannis, ie
<txp:page_url context="id, s, c, context, q, m, month, author, commented" />
I’m not sure where that fits in with my problem. I think that’s for your scenario, Yiannis.
But it’s Friday afternoon so expect the unexpected.
Last edited by zero (2020-07-03 16:29:51)
Dozy P My attempt at music
Offline
Re: Duplicate content
zero wrote #324241:
Ha ha! Friday afternoon. My internet is slow, I can’t view your videos yet, Yiannis, but this is making me laugh.
I tried the zem-redirect plugin but there are no instructions except for paying customers at threshold state, which no longer exists.
Indeed but the instructions might not be needed as it works out of the box. Having said that, try Oleg’s recommendation first.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Duplicate content
colak wrote #324242:
Indeed but the instructions might not be needed as it works out of the box. Having said that, try Oleg’s recommendation first.
I don’t know why but I’m laughing my head off!
BTW, I’ve had no trouble with canonicals, they are all as expected or desired.
Last edited by zero (2020-07-03 16:38:39)
Dozy P My attempt at music
Offline
Re: Duplicate content
zero wrote #324241:
I’m not sure where that fits in with my problem. I think that’s for your scenario, Yiannis.
I think that my issue was sorted. You can try
<txp:evaluate query='"<txp:site_url trim="/" /><txp:page_url type="req" />" != "<txp:page_url context="id, s, c, context, q, m, month, author, commented" />"'>
<txp:txp_die status="404" />
</txp:evaluate>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Duplicate content
colak wrote #324244:
I think that my issue was sorted. You can try
<txp:evaluate query='"<txp:site_url trim="/" /><txp:page_url type="req" />" != "<txp:page_url context="id, s, c, context, q, m, month, author, commented" />"'>...
Aah! Now I’m kind of getting it, but it will take me a lot of studying to understand how this works and the penny finally drops.
Anyway, comments are now working as expected, all seems to be well, must get something to eat, will report back again after more tests later.
THANK YOU BOTH!
Dozy P My attempt at music
Offline
Re: Duplicate content
etc wrote #324238:
Oh, I must have forgotten about comments, sorry. Also, not sure about anchors. Could you try to replace
<txp:page_url context />with
<txp:page_url context="id, s, c, context, q, m, month, author, commented" />...and report back, please?
It works for my site but I also needed to add pg. Latest code
<txp:evaluate query='"<txp:site_url trim="/" /><txp:page_url type="req" />" != "<txp:page_url context="id, s, c, context, q, m, month, author, commented, pg" />"'>
<txp:txp_die status="404" />
</txp:evaluate>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Duplicate content
It works well for me too, Oleg. I’m not totally certain feeds are updating as normal because I’m working on localhost, but I can subscribe to a feed with no problem, so I think it’s all good.
Dozy P My attempt at music
Offline
Re: Duplicate content
colak wrote #324273:
It works for my site but I also needed to add
pg.
Ah! Well, you get the idea: put in context any URL parameter that you consider valid for you site. Originally, context attribute was designed to create canonical links, not exactly for link validation. But, as ever, txp community is inventive beyond any limit :-)
Offline
Re: Duplicate content
zero wrote #324274:
It works well for me too, Oleg. I’m not totally certain feeds are updating as normal because I’m working on localhost, but I can subscribe to a feed with no problem, so I think it’s all good.
Indeed I did not think of those. I’m wondering if we should add rss, atom to the list. I also checked com_connect which is behaving just fine.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Offline
Re: Duplicate content
Just a heads up that the solutions offered in this thread yielded some problems.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline