Thread tagged as: Error

Image upload error in Markitup


My client is getting an error when trying to upload images in a Markitup textarea. Annoyingly I can't reproduce it, even logging in with the same User credentials. The PHP error is:

PHP Notice:  Undefined index: image in /home/csgc/public_html/admin/addons/plugins/editors/markitup/image_upload/image_upload.php on line 16

The behaviour he is seeing is the little tooltip with the upload in that appears when you click the image icon turns red when he clicks "Upload", and the image is not added. This is the post.html template I am using:

<div class="hentry">
        <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="entry-title">
            <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />

    <p class="entry-published date">
        <perch:blog id="postDateTime" type="date" label="Date" time="true" format="%d %B %Y" divider-before="Meta information" /> 
    <perch:if exists="image">
            <img src="<perch:blog id="image" type="image" width="320" height="240" crop="false" label="Image" help="This is an image that will appear in the list view of News articles" order="4" />" alt="<perch:blog id="postTitle" />" />
    <div class="description entry-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="markitup" markdown="true" size="xxl autowidth" required="true" imagewidth="800" />

<perch:blog id="excerpt" type="textarea" required="true" help="Add a few sentences from the article - this is what people will see when looking at the main news pages, to tempt them to click and read the entire article" label="Excerpt" editor="markitup" markdown="true" order="3" suppress="true" size="s"/>
<perch:blog id="image" type="image" width="240" height="120" crop="true" suppress="true" />

Here is the short diagnostics for the site:

Perch: 2.8.32, PHP: 5.5.38, MySQL: 5.5.52, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), perch_forms (1.7), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms' ); ?>
PERCH_PATH: /home/csgc/public_html/admin
PERCH_CORE: /home/csgc/public_html/admin/core
PERCH_RESFILEPATH: /home/csgc/public_html/admin/resources
Image manipulation: GD
PHP limits: Max upload 16M, Max POST 8M, Memory: 128M, Total max file upload: 8M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/csgc/public_html
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php

I have tried re-uploading the Markitup editor but it hasn't made a difference. This has worked previously and I have not made any changes, so I am a bit stumped. Memory allocations look fine, the image itself is only 250kb.

Thanks for any insight


Mike Harrison

Mike Harrison 37 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you tried uploading the same image he is uploading, using the same web browser?

If you can't reproduce it, then it is doubtful that we can!

I have done exactly that and it works! Must be nearly Christmas. Will see if I can work it out and post here if I find out what it is in case anyone else has the same issue.