Comments (14)
Oops, shame on me. A drawback of some code unification between the individual/list modes it is. Will fix, thanks @jools-r for the hint.
from textpattern.
Thanks for the super prompt reply. One reason why we haven't really noticed it – aside from the fact that few people are using the dev version – is that the four-point-nine theme avoids the issue because it differentiates between article_list and individual_article views and consequently uses separate txp:article tags.
from textpattern.
While we are here, appending q
parameter to an individual article URL seems to trigger 'is search' mode of some tags, see e.g. https://release-demo.textpattern.co/index.php?id=1&q=wel. Should it be fixed somehow?
from textpattern.
Hmm, that looks strange, I agree, and makes page logic handling more difficult when if_search
is used for determining page design but returns true on an individual article page.
Is there a use case where a search parameter could be useful on an individual article page? How it's written at present with explicitly excluding sticky pages seems to suggest there might be / have been one.
If not, one could restrict this line to just $is_article_list && $q
. Presumably, !issticky
is then irrelevant.
If there is a use case in individual articles, maybe if_search needs to be handled more carefully in the design of page logic by placing it within if_article_list or if_individual_article tags to determine how it responds. But that could break some sites' existing page templates.
from textpattern.
While we are here, appending
q
parameter to an individual article URL seems to trigger 'is search' mode of some tags, see e.g. https://release-demo.textpattern.co/index.php?id=1&q=wel. Should it be fixed somehow?
Is that only in ?messy
url mode? On my set up (localhost / TXP-dev) I use section/title
and appending &q=delete
results in a 404 page (default template, default article from TXP 4.8).
scratch all that domain.tld/section/article-title?q=delete
does indeed trigger a search… :-(
from textpattern.
Is there a use case where a search parameter could be useful on an individual article page?
That is the question. Otherwise we could unset $pretext['q']
even earlier, as soon as $is_individual_article
is set.
from textpattern.
Is there a use case where a search parameter could be useful on an individual article page?
There may be a case, but I can't think of one. If you're searching, you search the entire database of articles, or those in one (or more?) section(s), or one (or more?) category. If you search for a term and it only returns one article, then great but there's no need to trigger a search from article granularity, imo. CTRL-F on the page, ftw.
from textpattern.
May I bump this? While it's easy to work around, it's crucial for backwards compatibility.
from textpattern.
Done, sorry for the delay. I'd keep this issue open, since we yet have to decide on the search parameter behaviour.
from textpattern.
Thank you! As ever, a little more eloquent than my syntax :-)
That resolves the functional issue outlined at the top, and I feel we should close this issue as it is a fundamental aspect of how Textpattern works. Should I re-open the question about unsetting $pretext['q']
earlier, or is that something that could perhaps be resolved swiftly so as not to add new things to the list.
from textpattern.
I still can't envisage a use case for ?q
within an individual article context. So I'm fine with unsetting it earlier if that limits it and doesn't have any unintended consequences now that doArticles()
is more closely aligned for article(_custom) and list behaviour.
from textpattern.
Core does not need it, but some plugins (etc_search
?) can output search results on individual pages too, à la <txp:article_custom />
.
from textpattern.
If it's useful for plugins then I'm happy to keep the behaviour. Doesn't hurt anyone, does it?
from textpattern.
Too error-prone at the moment.
from textpattern.
Related Issues (20)
- Prep work and actions for MySQL 8.3 support
- Progressively get rid of MD5 HOT 2
- jQuery 4.0.0 is coming soon HOT 13
- How to customize <title></title> HOT 1
- how to install EDITOR HOT 2
- Safari 15.7 / iOS 15 preview text view not loading HOT 2
- Show spam form action (or rather page URL) is not updated on clear search HOT 6
- Function strftime() has been DEPRECATED as of PHP 8.1.0 but is still used in safe_strftime HOT 8
- Textpattern 4.9.0 release flight plan HOT 17
- Incorrect layout on the plugins panel HOT 3
- RFC: Textpattern 4.9 is final 4.x release; Textpattern 5.0 next 'big' release HOT 6
- Edit file / missing file: non functional “delete” button
- Edit file / missing file: SQL error and warning when pressing ‘save’ HOT 1
- Edit file panel - some HTML & layout issues HOT 1
- utf8_en/decode() are deprecated in PHP 8.2 HOT 7
- PHP 8.4 compatibility tracking HOT 4
- Articles with status 'Hidden' do not return a `404 Not Found` response when requested but a `200 OK` HOT 1
- RFC: would these third party libraries / helpers solve any problems? HOT 2
- Form names may contain hyphens or other 'strange' characters. Such form names do not work as 'txp::' shortcuts. HOT 7
- "Admin > Visitor logs" panel rendering gets caught in EasyPrivacy, a very popular ad blocking filter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textpattern.