I enabled the MediaWiki flexifilter that comes with the module on a D7 site. I changed the URL of [[linked]] pages to go to our own server instead of Wikipedia.
I enabled the text filter, but now I get the following error at the top of pages on the site:
Notice: Undefined index: components in flexifilter_filter_prepare() (line 405 of /public_html/sites/all/modules/flexifilter/flexifilter.module).
Warning: Invalid argument supplied for foreach() in flexifilter_invoke_components() (line 322 of /public_html/sites/all/modules/flexifilter/flexifilter.module).
Notice: Undefined index: components in flexifilter_filter_process() (line 415 of /public_html/sites/all/modules/flexifilter/flexifilter.module).
Warning: Invalid argument supplied for foreach() in flexifilter_invoke_components() (line 322 of /public_html/sites/all/modules/flexifilter/flexifilter.module).
I get it when editing a node as well as viewing. I tried changing the order of the text filters, moving the MediaWiki flexifilter from first to last in the processing order, but this has made no difference.
Any ideas what's up?
Thanks!
Al,
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | get-components-1262134-5139272.patch | 1.27 KB | soyarma |
Comments
Comment #1
ajaysolutions commentedI've since disabled the Mediawiki flexifilter, but today I created my own basic Flexifilter to make tagged keystrokes look better for special characters.
Anyway, when I preview the flexifilter, and test:
<kbd>Enter</kbd>It works, and correctly identifies the string and replaces "Enter" with "↵ Enter". However, I don't get the same behaviour when editing or viewing a page that uses this code and this flexifilter. I get the same errors above, referring to the same lines (405, 322 and 415) of flexifilter.module.
I presume this is something fundamental with the D7 version of the module?
Comment #2
uwguy commentedJust wanted to say I'm seeing this same error using D7, Notice... line 405 and Warning... line 322 as above.
Comment #3
tshakah commentedSame problem; had hundreds of errors (but basically the same 3 repeated). The preview panel works fine, it's just when a filter is enabled on the input that it gives the errors (and the filter doesn't work).
Comment #4
reecemarsland commentedEach of these functions call $filters = flexifilter_get_filters(FALSE);
Which bypasses loading the components, but the filters need the components. Changing the code to:
$filters = flexifilter_get_filters(TRUE);
Appears to fix it.
Comment #5
ajaysolutions commentedNice on ReeceMarsland. Is this included in the beta1 release?
Comment #6
sveloz commentedI get eccactly the same errors at ajaysolutions. I tried ReeceMarsland's fix in #4, but didn't work for me, after which I get other errors:
Maybe there are some more fundamental debugging required. Because of this error, the module is useless until it is fixed, for those who are affected by it. When I run an preview in admin/structure/flexifilters/4/preview, the output is correct and there are no error. The module only breaks when used through viewing a node.
Comment #7
sveloz commentedComment #8
groovehunter commentedWould be great to have that fixed; subscribing here; Had a look to check if I can do but it took me quite some time to understand so I have to stop here.
Comment #9
soyarma commentedThis patch will fix the issue. Also, I've contacted Charlie directly to see if there are any unintended consequences. In my testing, after applying the patch things work correctly.
Comment #10
sveloz commentedI forgot to update it here. It turned out that the patch did solve the problem on my site, but under some condition that I didn't figure out what was. I installed several input filter modules, and it could've been that some modules don't cooperate, I don't know. I installed and uninstalled different modules on my testsite, and I didn't cope with what I did, but at some point these errors was away when I did the correction in the patch.
Comment #11
tshakah commentedI applied the patch and it seems to be working fine as well. Thanks.
Comment #12
hampshire commentedWorked great. Thanks
Comment #13
theprecarious commentedThe patch in #9 worked for me as well. Thanks!
I wonder also if the title of this issue should be changed?
Comment #14
silkogelman commentedPatch #9 worked for me too (applied on Flexifilter 7.x-1.0-beta1)
Tested adding a new Flexifilter, and it seems to work fine.
Comment #15
jarodms commentedpatch committed.
Comment #16
jarodms commented