Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2007-10-08 11:20:31

Patrik
New Member
Registered: 2007-10-07
Posts: 7

Re: [plugin] [ORPHAN] ob1_advanced_search

Tried to install it, got the following error message-any help appreciated:

Tag error: <txp:ob1_advanced_search setup=“1” /> -> Textpattern Warning: Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen (diese kann f�r verschiedene Server-Versionen unterschiedlich sein) bei ‘WHERE `Key_name` = ‘searching_total’‘ in Zeile 1
SHOW KEYS FROM textpattern WHERE `Key_name` = ‘searching_total’
textpattern/publish.php:963 ob1_advanced_search() on line 84

textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_misc.php(534) : eval()’d code:161 safe_query()
textpattern/publish.php:963 ob1_advanced_search()
processtags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/publish.php:456 parse()
index.php:39 textpattern()

Tag error: <txp:ob1_advanced_search setup=“1” /> -> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource on line 165

textpattern/lib/txplib_misc.php(534) : eval()’d code:165 mysql_fetch_array()
textpattern/publish.php:963 ob1_advanced_search()
processtags()
textpattern/publish.php:922 preg_replace_callback()
textpattern/publish.php:456 parse()
index.php:39 textpattern()

Offline

#62 2007-10-08 17:12:04

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Patrik:

  1. What MySQL version are you running on your server? You can find it under Admin -> Diagnostics in your TXP install.
  2. What Textpattern version are you using?

Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#63 2007-10-09 05:16:17

Patrik
New Member
Registered: 2007-10-07
Posts: 7

Re: [plugin] [ORPHAN] ob1_advanced_search

obeewan wrote:

Patrik:

  1. What MySQL version are you running on your server? You can find it under Admin -> Diagnostics in your TXP install.
  2. What Textpattern version are you using?

Dear Obeewan,
thanks for the fast reply. Textpattern 4.0.5 and MySQL: 4.1.20-log

Offline

#64 2007-10-09 09:29:00

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

I’m currently at work but I’ll investigate when I get back home.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#65 2007-10-13 07:23:43

Patrik
New Member
Registered: 2007-10-07
Posts: 7

Re: [plugin] [ORPHAN] ob1_advanced_search

http://dev.mysql.com/doc/refman/5.0/en/extended-show.html
So this plugin only works with 5.0x MySql currently.

Offline

#66 2007-10-13 08:26:29

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Hmmm .. Well .. I do run a 5.0 install on my local machine. Just installed v4.1 of MySQL to test the whole thing out.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#67 2007-10-13 08:42:06

Patrik
New Member
Registered: 2007-10-07
Posts: 7

Re: [plugin] [ORPHAN] ob1_advanced_search

I guess you’d have to create a workaround, something like this was what i found on a similar problem:

function checkKey($sTable, $sKey)
	{
		$aIndex = $this->getRows("SHOW INDEX FROM ". $this->getT($sTable) ."");
		foreach($aIndex as $index)
		{
			if ( $index['Key_name'] == $sKey)
			{
				return true;
			}
		}
		return false;

Last edited by Patrik (2007-10-13 08:59:37)

Offline

#68 2007-10-13 08:47:20

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Patrik wrote:

function checkKey($sTable, $sKey)
       {
               $aIndex = $this->getRows("SHOW INDEX FROM ". $this->getT($sTable) ."");
               foreach($aIndex as $index)
               {
                       if ( $index['Key_name'] == $sKey)
                       {
                               return true;
                       }
               }
               return false;
}

—-

It was actually something like that in the old version of the plugin. I’ll see what my digging with MySQL v4.1 does to the plugin.

(add bc. before a block of code)

Last edited by obeewan (2007-10-13 08:48:19)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#69 2007-10-13 09:43:05

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

MySQL v4.1 problem solved and added to 1.031b version. I tested the plugin with the rest of the features and found no more “problems” with that MySQL version.

See first post for details.

v1.031b [2007-10-13]

Bug fix

  • Didn’t work with MySQL v4.1 since it didn’t support SHOW KEYS FROM table WHERE that was added in MySQL v5. Thanks to Patrik for spotting this and pointing the solution in the right direction.

Last edited by obeewan (2007-10-13 09:46:14)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#70 2007-10-13 10:32:47

Patrik
New Member
Registered: 2007-10-07
Posts: 7

Re: [plugin] [ORPHAN] ob1_advanced_search

Thank you very much for your efforts, I appreciate it. Now the install appearently worked fine, however when I try to use the search form and click the advanced search button, it forwards me to a non existing page (Folder url is /gdb/search/ and it redirects to /gdb/search/gdb/?bts=1&rpp=1&q=&wh=1&ww=&oc=1&ad=1&sd=&ed=&bts=Advanced+search) which causes a 404 error page to show.
If I’m manually changing the url and removing the added /search/gdb/ it does work – could it have to do with the clean url’s option using a htaccess with mod_rewrite or so?

Last edited by Patrik (2007-10-13 10:51:26)

Offline

#71 2007-10-13 10:57:23

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

Hard to say what actually makes it happen. I am currently helping Stuart with a problem he’s having with the plugin and this came up there aswell. Probably some replace that needs my attention.


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#72 2007-10-13 11:19:36

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] ob1_advanced_search

v1.032b released. See first post for details.

v1.032b [2007-10-13]

Bug fix

  • Subfolders and clean URLs didn’t work. The plugin added the subfolder twice to the URL.
  • Used safe_pfx_j instead of safe_pfx when checking the KEYS and INDEXes of the table. Created errors.

Last edited by obeewan (2007-10-13 11:23:24)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

Board footer

Powered by FluxBB