My page was overflowing with this error (see title) after I installed 3.0-alpha3. I couldn't really pin down what was causing the problem, but maybe this info is useful in refining the alpha.

Thanks for the great module!

Comments

Grayside’s picture

Thank you. Did you go on to successfully use Fl3?

basanta86’s picture

No, I had to switch back to Fl1.8 quickly, because it's a live site.

I have a lot of modules installed, so it's possibly a conflict between two modules.

Grayside’s picture

Status: Active » Needs review

I just installed this to a Drupal instance that has never before seen Freelinking. I had no problem on the modules screen.

FL3 does not have a database backend, but FL1 did, and built a number of blocks on top of it. I suspect the errors you saw are related to that. If you uninstall Freelinking 1 first, or clear the theme registry after installing FL3, the errors should go away.

I will make a note in the 3.x README to uninstall FL1 before proceeding.

Setting to needs review in hopes of confirmation that this will do the trick.

basanta86’s picture

Status: Needs review » Active

I used last night to do some testing.

First, I tried properly deinstalling Fl1.8 first, but to no avail. The error kept occurring.

Then I took the time to turn on my modules one by one: It seems the Table of Content module is the problem.

Another thing I found is that the error message seems to appear once for every freelink in the node.

Thanks!

Frank Leith’s picture

After deinstalling the 1.x version and installing the 3.x version I got these mysqli_real_escape_string() errors.
First it was occurring with every freelink link, now only when I edit content with freelinks.
I don't have a Table of Content module installed. If it's use full I could turn my modules on and off one by one...?

After an update.php the whole circus starts all over again...

Grayside’s picture

1. Disable Freelinking 1.x
2. Uninstall Freelinking 1.x
3. Clear the cache.
4. Enable freelinking 3.x

If this does not fix it, then freelinking 1.x has some serious uninstallation issues, and I personally have never looked at that code.

Frank Leith’s picture

Freelinking 1.x is already deinstalled

This is what I did:

* Disable Freelinking 3.x
* Clear the cache
* Enable freelinking 3.x

No succes...

Is there any way to fix this? Except by rebuilding our site?

Grayside’s picture

Version: 6.x-3.0-alpha3 » 6.x-1.x-dev
Component: User interface » Code

I haven't had time to set up a Freelinking 1.x site to run through an upgrade test.

It looks like the problem is related to Freelinking 1.x not gracefully uninstalling it's database table. I'm not sure whether deleting it by hand will fix the error, but it may be worth trying.

I am setting this issue to 1.x because it seems to be a migration path problem related to improper uninstallation.

Frank Leith’s picture

I can wait two weeks max, than I have to start over again.

I hope you find a fix, I wish I started with 3.x right away.

Grayside’s picture

Status: Active » Postponed (maintainer needs more info)

I went through this process again and could not replicate the error. What other modules are you using?

Gyt’s picture

Title: mysqli_real_escape_string() expects parameter 2 to be string, array given in /database.mysqli.inc on line 323 » mysqli_real_escape_string() expects parameter 2 to be string, locale module problem
Version: 6.x-1.x-dev » 6.x-3.0-alpha3
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

I have this error with 6.x-3.0-alpha3. 6.x-3.0-alpha1 and 6.x-3.0-alpha2 works right. If I disable locale module 6.x-3.0-alpha3 works right too. So problem is here (freelinking_nodetitle.inc):

  if (module_exists('locale')) {
    // if a language is specified, ignore the global
    if ($node_lang) {
      $language = $node_lang;
    }
    $sql = "SELECT nid, language FROM {node} WHERE title = '%s' and language = '%s'";
    if (variable_get('freelinking_nodetitle_searchcontenttype', 'none') != 'none') {
      $sql .= " AND type = '%s'";
      $result = db_query($sql, $title, $language,
        variable_get('freelinking_nodetitle_searchcontenttype'), 'none');
    }
    else {
      $result = db_query($sql, $title, $language);
    }
  }
Frank Leith’s picture

Does this mean we now know what is wrong?
So I can wait with rebuilding my site?

Grayside’s picture

I have not had a chance to work out a fix. I will hopefully get time in the next day or two.

Frank Leith’s picture

No problem, good luck.

Grayside’s picture

The locale stuff does not work. I will be pulling together a new alpha release to remove or fix it in the next couple weeks.

Frank Leith’s picture

In note 11 Gyt says that 6.x-3.0-alpha2 doesn't contain the bug. Is it an option when I use that version for now? Since you still need a couple of weeks to prepare a new release. If so, where can I download 6.x-3.0-alpha2?

Gyt’s picture

You can simple comment or delete these strings in your freelinking/plugins/freelinking_nodetitle.inc

Grayside’s picture

All releases can be viewed here: http://drupal.org/node/19699/release

Grayside’s picture

Status: Active » Fixed

Locale stuff is fixed in tomorrows -dev tarball. Next alpha is not too far off.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.