I tried installing the Drupal 6 Knurl tar file. Under RC2, I got the following error when I enabled the module:
user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: CREATE TABLE knurl ( `tid` INT unsigned NOT NULL auto_increment, `uid` INT unsigned NOT NULL DEFAULT 0, `short_url` VARCHAR(255) NOT NULL DEFAULT '', `link` TEXT NOT NULL DEFAULT '' ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Program Files\XAMPP\xampp\htdocs\drupal6rc2\includes\database.inc on line 498.
I added a primary key to the knurl table schema, which seemed to fix that.
I also noticed that the javascript/bookmarklet for adding a link didn't contain the subdirectory where I have Drupal installed. Adding a call to base_path() got that added. Unfortunately, the bookmarklet still isn't working (the link doesn't appear to be getting passed in correctly). I suspect that may be related to the form_token not being passed in, when the URL is coming in from outside the form.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | knurl_install_211848.patch | 375 bytes | christefano |
| #3 | knurl-install.patch | 395 bytes | korayal |
| #3 | knurl-module.patch | 4.26 KB | korayal |
| knurl-module.patch | 1.37 KB | matt v. | |
| knurl-install.patch | 492 bytes | matt v. |
Comments
Comment #1
matt v. commentedBy the way, thanks for creating the module.
I'm interested in possibly adapting it to act as a YubNub clone.
Comment #2
korayal commentedyou forgot to change the file location in patch file.
Comment #3
korayal commentedfixed the location, fixed the favorite shortcut problem.
Comment #4
korayal commentedalso it's better to look for referer with referer_uri() function than $_GET["url"]
check;
http://www.hecatomber.org/knurl?url=http://www.google.com.tr/search?hl=t...
i changed my module like this;
$_GET['url'] = referer_uri();and the shortcut;
javascript:void(location.href='http://www.hecatomber.org/knurl?url=')So, i don't even need to specify an url because that's what referer_uri() command does. But this time it doesn't work on manual entries.
this should do it;
Comment #5
christefano commentedThe patch for the .install file doesn't apply so I rerolled it. Leaving this as "needs review" so that we can get the .install file fixed.
I haven't tried the patch for the bookmarklet. Can someone create a new issue for that?
Comment #6
cfuller12 commentedThe install file has been updated and no longer throws errors in the latest release. I don't like the use of $_GET['url'] either so I'll create a separate issue for that.