Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#301 2006-10-06 18:34:02
- leohart
- Member
- Registered: 2006-02-09
- Posts: 22
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hi everyone, please help me:
I got this error message with TXP 4.0.3 and latest version of txp:rss_unlimited_categories. This happens when I click on the permlink (/section/categories/url_title) of an article. Nothing happens when I put a non-existent url_title.
I think there might be something wrong with my configuration but I can’t seem to find the error. Been digging the source code for possible error of assigning out[‘id’] but to no avail.
<code>
Fatal error: Unknown column ‘mp’ in ‘where clause’ select ID,Section from `textpattern` where ID = mp limit 1 in /opt/lampp/htdocs/textpattern/textpattern/lib/txplib_db.php on line 61
</code>
mp is a category. How can it end up being queried as ID WITHOUT quotes is beyond me.
Also, can someone please help me understand what is hu in the code below (line 65, rss_unlimited_categories.php)
<code>
$subpath = preg_quote(preg_replace(“/http:\/\/.(\/.)/Ui”,”$1”,hu),”/”);
</code>
More Update:
I think I have found the problem. This plugin would find the id of the article with url_title passed in via URL schema /section/category/url_title. For some reason, it does NOT pass this information back via (re)assigning $_GET[‘id]. Thus, after the plugin is processed, preText() function is called. preText would then think the 2nd part of the URL (category) to be the ID. So it would construct a query (thus causing the fatal error above).
This is a possible core bug (not checking input url)
This is also a possible problem with this plugin. I added some $_GET (re)assignment and now I have ANOTHER problem. all the article of the section and category is displayed but not the one in $_GET[‘id’].
Oh, I just wish I have more documentation.
Even more update:
Well, I don’t think it is a core bug, totally this plugin bug.
What now
In this plugin code, there is (line 348, rss_unlimited_categories.php)
<code>if ($comparing != $actual_id) {$articles[] = parse($article);}</code>
What why that be needed? Why do you need to exclude the current article, Rob? My guess is you are implementing recursive calls of rss_unlimited_categories_article_list (in forms)
Last edited by leohart (2006-10-06 22:32:48)
Offline
#302 2006-10-06 22:58:49
- leohart
- Member
- Registered: 2006-02-09
- Posts: 22
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Finally, I think I fix the problem
Lines 101-105 (please note that I add php open tag on the top so the line number might be 1 off
<code>
$out[‘id’] = $rs['ID'];
$out['s'] =
$rs[‘Section’];
$out[‘c’] = (ckEx(‘category’,$u2)) ? $u2 : ‘’;
//gotta return those somehow right? resetting them in $GET
foreach($out as $k => $v){$_GET[“$k”] = $v;}
</code>
I added the comment line and the foreach line. Also, use
<code><txp:if_individual_article><txp: article /></txp:if_individual_article></code>
to output one single article instead of relying on txp:rss_unlimited_categories to output only 1 article when needed.
Last edited by leohart (2006-10-06 23:01:35)
Offline
#303 2006-10-19 16:42:33
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Version 0.6 for TXP 4.0.4
There is a new version of rss_unlimited-categories which is compatible with TXP 4.0.4. Really the only difference in the new version is a fix for the positioning of the multiple categories select list on the Content -> Write tab.
Offline
#304 2006-10-26 17:34:21
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hey Rob…
What (if any) are the available attributes for “rss_sct_permlink” ?
hoping for title attribute and ideally would like to drop in txp:excerpt or txp:title on a form by form need.
function rss_sct_permlink($atts, $thing) {
global $thisarticle, $c;
$url = hu.$thisarticle['section']."/$c/".$thisarticle['url_title'];
return tag(parse($thing),'a',' href="'.$url.'" title="'.gTxt('permanent_link').'"');
}
What do I need to change in title=”’.gTxt(‘permanent_link’).’”’); to get close to what I’m looking for?
BTW this plugin does just about anything I need it to highly extensible… so thanks!
Jamie
[deited for poor spelling :) ]
Last edited by soulship (2006-10-26 17:38:07)
Offline
#305 2006-10-27 02:06:20
- leohart
- Member
- Registered: 2006-02-09
- Posts: 22
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I really think that this plugin should become a core. 2 categories are simply not enough for many cases. Also, what’s up with multiple statuses and clean url. There are A LOT of stuff that should make it to the core and be supported.
Also, this plugin does not support keyword or custom fields? I have hacked together a solution that support keyword but any work from the author on this would be really helpful. Also, the list of categories should be longer, at least 1.5 the current height.
Is there a way that I can make those changes and submit them back for version 0.7?
Offline
#306 2006-10-27 23:50:48
- cpk
- Member
- Registered: 2005-08-07
- Posts: 62
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I really love this plugin and agree with previous posts that it should become core TxP.
I would like to know if it’s possible to add an ID attribute instead of (or in addition to) the class attribute for rss_unlimited_categories_filedunder. I suspect that I might be able to hack the plugin to replace the class attribute with ID but don’t want to break it or lose existing functionality.
Also, I would love to see the ability to add individual id or class attributes to all output from each rss_unlimited_categories elements, e.g. categories, cloud, filedunder, etc. This would be very helpful for “you are here” navigational cues when combined with CSS and id or class attributes applied to the body tag.
cpk
Offline
#307 2006-10-28 15:27:01
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
The wildcard attribute for section seems to be ignored and going straight to using the default section of “article”. Even if I put in something specific it is still outputting a url with the section “article” in the path. Also trying section excluded-section,section1,section2 results in the same only article appears in the generated urls making the plugin not work as the tags link to nothing.
Anyone else see this?
thanks!
Jamie
[EDIT: SOLVED]
Last edited by soulship (2006-10-28 18:46:25)
Offline
#308 2006-10-28 18:44:06
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
OK the real problem I am having here is that clicking on a tag takes me to root/article/tag url, but I have a blank page. I raun a tag trace and see that:
<txp:if_section name=“article”>
[<txp:if_section name="article">: true]
<txp:if_category>
[<txp:if_category>: true]
<txp:article allowoverride=“1” form=“Article” limit=“5” pageby=“5” pgonly=“1” searchall=“1” searchsticky=“1” sort=“Posted desc” />@
[SQL (0.000487): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and ((Category1='vignette') or (Category2='vignette')) and Section = 'article']
</txp:if_category>
<txp:if_individual_article>
[<txp:if_individual_article>: false]
</txp:if_individual_article>
<txp:if_article_list>
[<txp:if_article_list>: true]
<txp:older>
</txp:older>
<txp:newer>
</txp:newer>
</txp:if_article_list>
</txp:if_section>
as you can see TXP is looking specifically only for category1 and category2 to match and display. What am I missing here? It has to be something trivial, but I have been trying to debug this for a while and just can’ figure out what I am doing wrong. Does someone have a simple explanation or a form of what goes in the article page template to actually display the output from the plugin that would show me what I am missing here? It almost seems like the plugin is missing an article replacement tag that knows to look in the new db for the other categories.
Offline
#309 2006-10-28 18:55:07
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I have an issue that I hope someone can assist with. I loaded the plug in to a brand new database. I am using the just released TXP. When I go to the articles, I see the unlimited categories box. The problem is that when I select mutiple multiple categories nothing happens?
I looked at the back end in dbadmin and I do not think the table was created by the plug. I see Category 1 and Category 2, but I do not see any container for the unlimited categories for the articles I am using as a test. Am I looking in the right place?
If I need to create it, can someone give me a little more guidance than what is in the plug in help.
Thanks.
Progre55
Offline
#310 2006-10-29 02:17:23
- leohart
- Member
- Registered: 2006-02-09
- Posts: 22
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
@Soulship: Instead of using txp:article please use txp:rss_unlimited_categories_article_list (with the same attributes). txp:article will pull articles from the old textpattern category scheme, not the new one. Also, I REALLY think that the txp:rss_unlimited_categories_article_list is too long. Why not rss_uc_article_list? Hopefully our kind author will look into this soon.
@progre55: When you say nothing happen, I am not sure what you mean, the categories tables should be created automatically for you. Also, replace all occurence of txp:article_custom and txp:article with txp:rss_unlimited_categories_article_list .
I am hoping to be able to merge this plugin with some other plugin that allows a greater more extensible permalink scheme, multiple categories, multiple statuses, support both keyword and custom field. All this at the same time as a nice backend UI. I will try to answer as many question as possible. If you also have the same idea/motivation to create this type of functionality for TXP, please contact me so we can work on it together.
Offline
#311 2006-10-29 03:31:47
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
leohart:
Sorry for my post. I now see the table. I was looking in the wrong place.
Thanks.
Offline
#312 2006-10-29 17:57:44
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
For anyone else having troule here, Make sure that you are not trying to use gbp_permanent_links. Very unfortunately they do not want to play nicely together no matter what I have tried. And that seems to be the root of most of my borked posts the last few days.
Offline