After updating to both 7.x-2.x-dev or 7.x-2.0-beta1 version, I got a blank screen with this error:

Fatal error: Unsupported operand types in /opt/lampp/htdocs/drupal/sites/all/modules/linkit/linkit.module on line 592

I installed back the 7.x-1.x-dev and everything worked fine.
I made an Uninstall of the module and reinstall the 7.x-2.x-dev version, and then the 7.x-2.0-beta1 version, but the same error was displayed.

The line in question is:
$settings['autocomplete'] += array('caseSensitive' => TRUE);

If I change it to:
$settings['autocomplete'] = array('caseSensitive' => TRUE);

then the website works again and if I am logged in, everything is working just fine. But, if I log out, I get 2 new errors displayed in every single page:

Notice: Trying to get property of non-object in _linkit_add_settings() (line 589 of /opt/lampp/htdocs/drupal/sites/all/modules/linkit/linkit.module).

Warning: array_filter() expects parameter 1 to be array, null given in _linkit_add_settings() (line 589 of /opt/lampp/htdocs/drupal/sites/all/modules/linkit/linkit.module).

See provided patch for a fix. Don't know if it's the right way to go, but it works for me.

Thank you.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dadderley’s picture

FileSize
32.78 KB

I am having the same issue. After updating from linkit-7.x-2.x-dev(2011-Sep-15) to 7.x-2.0-beta1 I get this.
Interestingly enough when updating from linkit-7.x-2.x-dev(2011-Sep-15) to linkit-7.x-2.x-dev(2011-Oct-30), I get the same error.

When I am logged it seems fine but, for anonymous users it's the WSOD and this message:

Fatal error: Unsupported operand types in /home/dev.mysite.ca/public_html/sites/all/modules/linkit/linkit.module on line 592

Also the the theming on the pop up dialogue box is gone and it does not work.
The attached file is a screen shot of the box (bot working) in 7.x-2.0-beta

I tried clearing caches and it has no effect.
After the update failed I uninstalled it and put linkit-7.x-2.x-dev(2011-Sep-15 back in.
It works fine.
Hopefully this information is helpful.

anon’s picture

Ok, I will look into this.

Do you have ctools installed?

dadderley’s picture

Yes indeed.
Chaos tool suite (ctools) 7.x-1.x-dev (2011-Oct-15)

Here is some additional info:

Notice: Undefined index: scheme in linkit_scan_url() (line 252 of /home/cfn/domains/mysite.ca/public_html/sites/all/modules/linkit/linkit.module).

Warning: array_filter() [function.array-filter]: The first argument should be an array in _linkit_add_settings() (line 589 of /home/cfn/domains/dev.mysite.ca/public_html/sites/all/modules/linkit/linkit.module).

I was getting these earlier before I switched back.

anon’s picture

Assigned: Unassigned » anon
Priority: Normal » Critical

This will only happend when you using the CKeditor module, and when there isnt any Linkit profile assign to the "anonymous user".

This is a pretty comon case, and the site will be totaly useless if we dont fix this, I have therefore marked this as critical.

anon’s picture

Status: Active » Needs review

I have commited a fix to the 7.x-2.x dev.

Can you test that please?

dadderley’s picture

Tried the latest:
linkit-7.x-2.x-dev.tar.gz 46.55 KB 4fbf27c453e9ad167d060c8d84cb0bc9
From Nov 18
I cleared the caches and cookies after the update.

I do not see the button in the ckeditor toolbar at all even though I have enabled linkit in the settings.

So, it can not be engaged.

anon’s picture

dougzilla, I dont think that the dev rel was updated before you downloaded it. Can you try to clone the latest version from GIT?

And about the button, thats a separate issue right?

dadderley’s picture

FileSize
31.38 KB

OK,
I just installed this:
linkit-7.x-2.x-dev.tar.gz 46.63 KB 4c35c404f3b8d3dfdb94a3b3012eac05
Last updated: November 19, 2011 - 04:11

The config screens all seem good.
I am not getting a fatal error for non-logged in users.
So, I guess this specific issue is fixed.

But, still no way of engaging linkit through the CKE (7.x-1.6) interface.

Also, for what it is worth.
After installing;
linkit-7.x-2.x-dev.tar.gz 46.63 KB 4c35c404f3b8d3dfdb94a3b3012eac05
from November 19

I get a bright pink warning on the available updates page saying that "Linkit 7.x-2.x-dev (2011-Nov-19) is unsupported"
See attached file.

anon’s picture

Status: Needs review » Fixed

Yes, the beta1 release is not support as it has this bug bug in it. thats why its pink.

Feel free to open a new issue about the button in CKe.
This issue is fixed.

astutonet’s picture

Status: Fixed » Active

I also have this issue with version 7.x-2.x-dev.

The patch in summary solve the question? It's official?

And more: in Opera 11.52, this error causes a Redirection Status, and the links also are broken.

How we can solve this?

Tks.

anon’s picture

astutonet Have you read the issue comments?
Try the latest version from GIT, or by now the dev relase should contain the fix aswell.

Please test that and provide me with some feedback here again after the test, Thanks.

astutonet’s picture

I applied the patch available that worked perfectly.

Thank you.

anon’s picture

Status: Active » Fixed
astutonet’s picture

Status: Fixed » Needs work

@anon,

I updated the module to version 7.x-2.x-dev released on 2011-nov-19.

Even with this new version, the error "Not supported" persists.

anon’s picture

@astutonet
Ok, are you a developer? Can you help me debug?

astutonet’s picture

I think we need help.

Unfortunately I am not a code developer. But I'll try to get information.

What I can help, I am at your service.

astutonet’s picture

@anon, my knowledge about Drupal is relatively small compared to your knowledge. I started using Drupal earlier this year and I still have much to learn.

Below are some interesting links on debugging:

- Drush;
- Drush Debug Tools;
- Coder;
- Schema

I'll study into the matter and see what I can do.

I hope this can help you.

anon’s picture

Status: Needs work » Closed (works as designed)

Oh sorry, my bad. I misunderstood the issue.

If the issue you (astutonet) are talking about is that the version is "Not supported", this is fixed.
Or its a know state. I had to annull the beta1 version as of the original issue in this topic.
7.x.2-0-beta2 will be out soon. That will fix the problem.

anon’s picture

Issue summary: View changes

wrong line (593 > 592)