Added MediaWiki filtering to Plain Text type. When using the markups, doing a preview results in several notices and warnings of the type:

Notice: Undefined index: components in flexifilter_filter_prepare() (line 405 of /var/www/htdocs/drupaldev/sites/all/modules/flexifilter/flexifilter.module).
Warning: Invalid argument supplied for foreach() in flexifilter_invoke_components() (line 322 of /var/www/htdocs/drupaldev/sites/all/modules/flexifilter/flexifilter.module).

and the previews remain unformatted by the MediaWiki filter.

Attached is a pdf print of the page in question.

PHP Version:

PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch (cli) (built: May  2 2011 23:18:30) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

Drupal Version: 7.12
flexifilter version: 7.x-1.0-beta6

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meladawy’s picture

The same issue

risca’s picture

Title: Attempting to use MediaWiki filter results in notices and warning, no result » Attempting to use self mada filter results in notices and warning, no result
Priority: Normal » Major

I'm haveing the same issue as described above, but using a self made php code (coming from here: http://drupalcode.org/sandbox/risca/1200940.git/tree/refs/heads/master).
The error is exacly the same.

Grumot’s picture

We've got the same kind of issue in this post: #1760466: Mediawiki demo filter does not work with Drupal 7.15. I'll report this there.

edit: at mine, it was solved by using the dev release: 7.x-1.0-beta2+1-dev

Duncan.HY’s picture

Issue summary: View changes
FileSize
229 bytes
218 bytes

OK. I am running Drupal version 7.38 and I download the 7.x-1.0-beta1 on 20180405.
I did not try the MediaWiki. But I did follow the Back To Top Tutorial.
It does not matter if I create the filter or using the provided import, both failed.

I debugged the code and located the error and fix it in flexifilter.module (see attached). With the error, I see no reason the MediaWiki will work.

The other not so serious problem I found is with -Structure -Flexifilters -Preview. It report attempt to convert array to string. I replaced one check_plain() with json_encode() and the message is gone. Again, see the attachment for patch.

Thanks.

* The reason I am working on this is that I got a fundraising project Always Organizer at KickStarter.com

Duncan.HY’s picture

Status: Active » Patch (to be ported)

Hi,

I was never involved in fixing bug and submit patches and
I use git but limited to my own project and is not familiar
with the cloning of things.

Please bear with me and help push this patch out.

Thanks.
* Point me to doc that can help me involved is great appreciate.