Search

Hi all -

More noobtacular action from me. :)

So, I switched text formatter types in a textarea field within a section that already had entries. Apparently, this was unwise. Now, whenever I save or create an entry for that section, I get:

Fatal error: Cannot redeclare markdown() (previously declared in [symphony dir]/extensions/markdown/lib/php-markdown-extra-1.2.4/markdown.php:52) in [symphony dir]/extensions/markdown/lib/php-markdown-1.0.1n/markdown.php on line 56

Whee. Is there a clever way to fix this? A trawl through the forum didn’t reveal anything.

Ok, not really an expert myself - but it seems you already have declared the Markdown in a different Library file.

I don’t think this is an exclusive Symphony issue as a quick Google search pulled up some interesting posts from all kinds of CMS’s.

This post in particular may shed some light.

It does seem that your class has been declared twice though, and that may have been a Symphony issue. Others more experienced may be able to help here.

But in the meantime what version of Symphony are you working with, and what extensions related to text formatting do you have installed?

The issue is not really about symphony (as the markdown code has been borrowed from somewhere else).

The problem really is that the same function (markdown()) has been declared (outside of a class) for both markdown and markdown extra (for filenames, check the error).

So if both fields are used on the same page, this error will occur.

The fix might be relatively easy, but it might be rather hard too (depending on how markdown is used, which I haven’t looked at yet).

Looks like this has been seen elsewhere, as well. :)

Switching all fields in a section to the same flavor of markdown fixed this issue.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details