Forum

Thread tagged as: Problem, Addons, Events

Markdown links not working

I'm seeing a strange thing on the events app that any links created with Markdown are not being processed correctly. Instead of the output on the published event being a link to another website it is showing the markdown syntax on the page. Other markdown syntax such as bold on words appears to be working.

You can see an example here

Perch: 2.8.34, PHP: 5.4.45, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_events (1.9.3), perch_forms (1.8.3), perch_shop_paypal (1.2.3), perch_members (1.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_events', 'perch_shop_paypal', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/cluster-sites/3/c/cmj.org.uk/public_html/perch
PERCH_CORE: /home/cluster-sites/3/c/cmj.org.uk/public_html/perch/core
PERCH_RESFILEPATH: /home/cluster-sites/3/c/cmj.org.uk/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 64M, Memory: 128M, Total max file upload: 64M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
HTTP_HOST: www.cmj.org.uk
DOCUMENT_ROOT: /home/cluster-sites/3/c/cmj.org.uk/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Phil Bowell

Phil Bowell 0 points

  • 4 years ago

Can you post your template code?

This is my event-detail.html template

<div class="vevent">

  <div class="events-header">
    <div class="container events-title">
        <h1><perch:events id="eventTitle" /></h1>
    </div>
  </div>

  <div id="events-intro">
    <div class="container">
      <p>Event Date: <span class="value-title" title="<perch:events id="eventDateTime" format="j M Y" />"><perch:events id="eventDateTime" format="l, j F Y" /></span></p>
      <p>Event Start Time: <span class="value-title" title="<perch:events id="eventDateTime" format="j M Y" />"><perch:events id="eventDateTime" format="g:i a" /></span></p>
    </div>
  </div>

  <div id="events" class="container">

    <perch:if exists="image">
        <img src="<perch:events id="image" type="image" label="Image" />" alt="<perch:events id="eventTitle" />" />
    </perch:if>

    <div class="description"><perch:events id="eventDescHTML" type="textarea" textile="true" editor="markitup" encode="false" /></div>

    <perch:if exists="file">
      <div id="event-docs">
        <h6>Event Documents</h6>
        <perch:repeater id="file" label="Files" max="5">
        <perch:before><ul></perch:before>
          <li>
            <a href="<perch:events id="file" type="file" label="File" />"><perch:events type="text" id="desc" label="File Title" title="true" /></a>
          </li>
        <perch:after></ul></perch:after>
        </perch:repeater>
      </div>
    </perch:if>

  </div>

</div>

Hi Phil,

If you are using markdown you need this for your description:

<div class="description"><perch:events id="eventDescHTML" type="textarea" markdown="true" editor="markitup" encode="false" /></div>

At the moment you have textile="true" - it needs to be markdown="true"

Oh man, I knew it would be something simple like that. Can't see the wood for the trees sometimes.

Thanks Mike!

No problem - when you get time can you mark it as the solution? Thanks