Forum
MarkItUp gone bad after update to 2.8.29?
Hi, I just updated perch to 2.8.29 for a client, but it seems something with MarkItUp has gone bad on the production server. HTML in textareas have stopped working.
My development server for the same site works after the update. BUT, the UI:s differ when editing textfields! The development server looks good, the production server looks old (non-retina graphics)! The files in addons/plugins/editors/markitup are not the same. The production server has a both a config.js and a settings.js file for example - the dev server has all settings in config.js.
It seems like the production server update has not worked as it should. What should I do to get it in order?
From the production server: Perch: 2.8.29, PHP: 5.3.17, MySQL: mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $, with PDO Server OS: FreeBSD, fpm-fcgi Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29)
Regards, Asker
If the files aren't the same, upload the new files.
Replaced markitup directory with the copy from my dev server. Now MarkItUp looks updated. But the problem with html in the textarea remains.
This markdown:
Turns into this html:
And this only happens on the production server, which btw runs with a production database. Is there any Perch setting stored in the database that can affect this?
The template for the region is:
Regards, Asker
If you want to use html in a textarea you need to add html="true" to the Perch template tag otherwise Perch will encode it.
Thanks Rachel, that worked!
Is this a newish requirement as I don't recall changing the template? (The devserver showed the content OK as the content was already saved correctly in the database, when editing and saving a region it went bad like the production server.)
No, it's always been that way.
Did you update markitup too? There was an update to it in Nov 2015
Same installation, related error: Template:
The following in the textarea:
After re-saving the content / editing the text, the page now shows no picture, just
I've quick-fixed it with
But as soon as the editor changes another text on another page using the same template the same problem will occur. Why is this happening after the update, and what can I do about it?
Can we see your Diagnostics Report?
Plus the complete template.
Here it is, domain name changed though.
Basic diagnostics:
Complete content template:
Complete diagnostics:
Which version of Perch were you using where that Markdown syntax worked? I can't find a Markdown parser that converts the image when it's placed inside div tags.
The site is created on early Perch 2.4 versions, and the latest update was to 2.4.6 from what I can see in the SQL backup I have.
I can't find a case where that Markdown syntax works. Does the image need to be wrapped in a div?
No, the div is not really necessary per se, it's just used to assign a class for styling. There is no way of assigning a class to the image directly. The only other way I see is to rework the template to include the styling there, but then all images will be styled the same in the text area, no way of individual styling...
You can use the
image classes
attribute to give a list of class options for the user to apply to an image:https://docs.grabaperch.com/docs/templates/attributes/type/textarea/
That would still apply one class to all images in the textarea. But then instead perhaps if more images are needed with different styling, we should use multiple items for the content region so they each can have a different class set on them. (Currently it's used to right or left float the image)
No, it gives an option to the user per-image.
How/where would the user apply these classes?
It happens in the image upload dialog box.
Oh sorry, missed the "the user can apply" part of the documentation! Great, that will solve the problem, just need to re-upload the images after I change the template then.