June 2018 Archives

Fixing Movable Type Open Source

|

The Problem: my MT Blog was refusing to load the CMS because of software bit-rot.

More Detail: If I try to go to the CMS page I get this (Obviously, as is proud tradition here, all system output happens on striped fanfold paper):

"Got an error: Unescaped left brace in regex is illegal 
here in regex; marked by <-- HERE in m/{{ <-- HERE theme_static
}}/?/"

What's causing this? In Perl 5.22, unescaped left braces are flagged as a warning, however in 5.26 (The current version as of writing), these are flagged as errors. As Moveable Type Open Source (MTOS)is no longer updated, there is no hope that this will ever be fixed.

To solve this problem in the short term, I could just fix the Regexes that are causing the issues and not share the fixes. This would solve the problem for me, and at least allow me to post to the site, etc. This is a good short term fix, but obviously there would be no further upgrades or new plugins, etc. This is what I've done for the short term.

The changes are fairly straightforward. All that's needed is to escape the left braces in the file lib/MT/App/CMS.pm on line 4978. It's probably best to escape all the braces. Escaping the braces just means that the line goes from:

$css =~ s#{{theme_static}}/?#$theme->static_file_url#ie;

to

$css =~ s#\{\{theme_static\}\}/?#$theme->static_file_url#ie;

In addition, a version of perl::YAML::Syck installed clashed with the system install. (This generally happens when a CPAN install conflicts with a packag-manager install.) This looks like this in the /var/log/httpd/error_log:

Syck.c: loadable library and perl binaries are mismatched 
(got handshake key 0xdb80080, needed 0xde00080)
That was fixed in the following way:
$ sudo dnf remove perl-YAML-Syck
$ sudo updatedb
$ locate Syck
# now delete it from anywhere it is remaining in the system
$ sudo rm -rf /usr/local/lib64/perl5/auto/YAML/Syck
$ sudo rm -rf /usr/local/lib64/perl5/YAML
$ sudo rm -rf /usr/local/lib64/perl5/JSON
$ sudo rm -rf /usr/local/share/man/man3/JSON\:\:Syck.3pm 
$ sudo rm -rf /usr/local/share/man/man3/YAML\:\:Syck.3pm 

MT comes with it's own version of YAML::Syck, packaged as MT::Util::YAML::Syck, so there was no need to reinstall the perl-YAML-Syck system package.

Longer term solution probably involve migrating to Wordpress from MovableType. Wordpress is actively developed as an open source solution, so that's a better option for the future.

About Me

Contact

  • Unsolicited Bulk Email (spam), commercial solicitations, SEO related items, link exchange requests, and abuse are not welcome here and will result in complaints to your ISP.
  • Any email to the above address may be made public at the sole discretion of the recipient.

Other Stuff

  • Powered by Linux
  • (RedHat Linux)

Categories

Monthly Archives

About this Archive

This page is an archive of entries from June 2018 listed from newest to oldest.

July 2016 is the previous archive.

July 2019 is the next archive.

Find recent content on the main index or look in the archives to find all content.