Importing filters fails

Flandry - December 5, 2008 - 09:17
Project:Flexifilter
Version:6.x-1.1-rc2
Component:Other
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The "import filter" functionality doesn't work for me. Whether using the examples provided here or exporting the mediawiki filter and changing a single character in the filter name, i get the error:
It appears that the serialized flexifilter you entered was improperly formed. Please check the source.

I have high hopes for this module so i could use wikidot's very intuitive markup, but it seems to be alpha still. Hope to see that change soon!

#1

cwgordon7 - December 8, 2008 - 22:59
Status:active» postponed (maintainer needs more info)

Could you please paste here exactly what you put into the flexifilter import feature to get this error?

#2

Flandry - December 12, 2008 - 20:26

Tried modifying the export of the default and importing it (changed one letter of the name):

a:9:{s:5:"label";s:16:"Nediawiki Format";s:11:"description";s:72:"This is an example format which provides a wikimedia-style input format.";s:2:"id";s:1:"1";s:7:"enabled";b:1;s:8:"advanced";b:1;s:5:"delta";s:1:"0";s:5:"cache";s:1:"1";s:10:"components";a:5:{i:0;a:3:{s:5:"class";s:24:"flexifilter_text_prepend";s:8:"settings";a:2:{s:4:"text";s:9:"";s:4:"step";s:7:"process";}s:2:"id";s:1:"2";}i:1;a:3:{s:5:"class";s:23:"flexifilter_text_append";s:8:"settings";a:2:{s:4:"text";s:8:"";s:4:"step";s:7:"process";}s:2:"id";s:1:"3";}i:2;a:3:{s:5:"class";s:22:"flexifilter_chunk_grab";s:8:"settings";a:7:{s:6:"starts";s:9:"";s:4:"ends";s:8:"";s:11:"pass_limits";i:0;s:14:"case_sensitive";i:0;s:12:"include_rest";i:1;s:4:"step";s:7:"process";s:10:"components";a:6:{i:0;a:3:{s:5:"class";s:28:"flexifilter_text_alternation";s:8:"settings";a:3:{s:4:"find";s:4:"====";s:7:"replace";s:10:"

";s:4:"step";s:7:"process";}s:2:"id";s:1:"5";}i:1;a:3:{s:5:"class";s:28:"flexifilter_text_alternation";s:8:"settings";a:3:{s:4:"find";s:3:"===";s:7:"replace";s:10:"

";s:4:"step";s:7:"process";}s:2:"id";s:1:"6";}i:2;a:3:{s:5:"class";s:28:"flexifilter_text_alternation";s:8:"settings";a:3:{s:4:"find";s:2:"==";s:7:"replace";s:10:"

";s:4:"step";s:7:"process";}s:2:"id";s:1:"7";}i:3;a:3:{s:5:"class";s:28:"flexifilter_text_alternation";s:8:"settings";a:3:{s:4:"find";s:3:"'''";s:7:"replace";s:18:"
";s:4:"step";s:7:"process";}s:2:"id";s:1:"8";}i:4;a:3:{s:5:"class";s:28:"flexifilter_text_alternation";s:8:"settings";a:3:{s:4:"find";s:2:"''";s:7:"replace";s:10:"
";s:4:"step";s:7:"process";}s:2:"id";s:1:"9";}i:5;a:3:{s:5:"class";s:22:"flexifilter_chunk_grab";s:8:"settings";a:7:{s:6:"starts";s:2:"[[";s:4:"ends";s:2:"]]";s:11:"pass_limits";i:0;s:14:"case_sensitive";i:0;s:12:"include_rest";i:1;s:4:"step";s:7:"process";s:10:"components";a:2:{i:0;a:3:{s:5:"class";s:22:"flexifilter_control_if";s:8:"settings";a:2:{s:10:"components";a:6:{i:0;a:3:{s:5:"class";s:24:"flexifilter_text_replace";s:8:"settings";a:3:{s:4:"find";s:1:"~";s:7:"replace";s:2:"\~";s:4:"step";s:7:"process";}s:2:"id";s:2:"12";}i:1;a:3:{s:5:"class";s:23:"flexifilter_text_append";s:8:"settings";a:2:{s:4:"text";s:2:"~~";s:4:"step";s:7:"process";}s:2:"id";s:2:"13";}i:2;a:3:{s:5:"class";s:27:"flexifilter_advanced_append";s:8:"settings";a:2:{s:4:"step";s:7:"process";s:10:"components";a:1:{i:0;a:3:{s:5:"class";s:24:"flexifilter_text_replace";s:8:"settings";a:3:{s:4:"find";s:2:"~~";s:7:"replace";s:4:"";s:4:"step";s:7:"process";}s:2:"id";s:2:"15";}}}s:2:"id";s:2:"14";}i:3;a:3:{s:5:"class";s:24:"flexifilter_text_replace";s:8:"settings";a:3:{s:4:"find";s:2:"~~";s:7:"replace";s:2:"">";s:4:"step";s:7:"process";}s:2:"id";s:2:"16";}i:4;a:3:{s:5:"class";s:24:"flexifilter_text_prepend";s:8:"settings";a:2:{s:4:"text";s:38:"";s:4:"step";s:7:"process";}s:2:"id";s:2:"26";}i:2;a:3:{s:5:"class";s:23:"flexifilter_text_append";s:8:"settings";a:2:{s:4:"text";s:4:"";s:4:"step";s:7:"process";}s:2:"id";s:2:"27";}}s:9:"condition";a:2:{s:5:"class";s:23:"flexifilter_text_search";s:8:"settings";a:2:{s:4:"find";s:1:"|";s:8:"is_regex";i:0;}}}s:2:"id";s:2:"24";}}}s:2:"id";s:2:"10";}}}s:2:"id";s:1:"4";}s:7:"id_next";i:29;s:9:"id_prefix";s:22:"flexifilter_component_";}s:3:"fid";s:3:"new";}

Also tried importing this example one: http://drupal.org/files/linkformatting.txt

Also noticed a comment at the bottom of the example filters page mentioning the same error.
http://drupal.org/node/212417

I'm happy to try importing something else that you have to test with.

#3

cwgordon7 - December 13, 2008 - 04:17

Are you on windows?

#4

Flandry - December 13, 2008 - 06:05

No, I'm using Firefox in linux.

#5

restyler - March 31, 2009 - 10:30

The same problem for me, tried to export default mediawiki filter and import it - error message.
Windows XP, ff3.0

#6

restyler - March 31, 2009 - 10:33

#7

restyler - March 31, 2009 - 10:34

Here is the export (why I can't attach files when I click 'edit' on my comment?)

AttachmentSize
export.txt 4.09 KB

#8

kiamlaluno - July 23, 2009 - 15:15

@restyler: When you edit a comment you previously created, you can only edit the comment text. That is something that has been recently changed after the passage to Drupal 6.

#9

iantresman - August 12, 2009 - 22:57
Status:postponed (maintainer needs more info)» active

I also just tried to import the Link formatting filter by clicking on the link to here, then copying and pasting the text into the field "Flexifilter to import", and clicking the Import button.

I'm using Firefox 3.5.2 under Windows Vista. Also tried using MS Internet Explorer 8.

I also get an error if I try to export the supplied Mediawiki Format filter, and then copy the "Serialized flexifilter (for manual imports)" text into the "Flexifilter to import" box.

If I try and import the "Back to Top" filter here I get the error message:

warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/sites/all/modules/flexifilter/flexifilter.module on line 550.

#10

iantresman - August 12, 2009 - 23:04

Just tried a simpler test, created a new filter, Label=Test and Description=A Test.
I exported and imported and received the same error message:

warning: Invalid argument supplied for foreach() in /home/mydomain/public_html/sites/all/modules/flexifilter/flexifilter.module on line 550.

Exported text:

a:9:{s:5:"label";s:4:"Test";s:11:"description";s:6:"A test";s:2:"id";s:1:"2";s:7:"enabled";b:1;s:8:"advanced";b:0;s:5:"delta";s:1:"1";s:5:"cache";s:1:"1";s:10:"components";a:2:{s:7:"id_next";i:31;s:9:"id_prefix";s:22:"flexifilter_component_";}s:3:"fid";s:3:"new";}

#11

genox - September 24, 2009 - 17:33

Hi there,

I receive the same error message while trying to import a filter via copy/paste from one browser window to another:

warning: Invalid argument supplied for foreach() in /modules/flexifilter/flexifilter.module on line 550.

- Tested on Safari 4 / Firefox 3.5 on OSX 10.6
- Happens with the default filter as well as custom filters.

Greetings,

Oliver

 
 

Drupal is a registered trademark of Dries Buytaert.