Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-09-20 15:30:32

awarnock
New Member
Registered: 2020-09-05
Posts: 8

Upgrading from 4.8.2 to 4.8.3

I have two issues, one minor, one a bit trickier.

I upgraded from v4.8.2 to v4.8.3 per the instructions at https://textpattern.com/start. I get an HTTP 500 error when I try to get to the login page. It’s caused by the Options clause in textpattern/.htaccess – Apache says “…/textpattern/.htaccess: Options not allowed here”. Sure enough, commenting out the Option clause resolves the error. Thought you might like to know.

The other problem is with the zem_contact_reborn plugin. I am running textpattern 4.8.3 under Apache 2.4, PHP 7.2.24 and mysql (MariaDB) v15.1, so everything is pretty much current. When I try to go to the contact page, I get this error:

Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /var/www/mydomain.com/html/textpattern/plugins/zem_contact_reborn/zem_contact_reborn.php:46 Stack trace: #0 [internal function]: zem_contact(Array, ‘\n\t<txp:zem_cont…’) #1 /var/www/mydomain.com/html/textpattern/vendors/Textpattern/Tag/Registry.php(141): call_user_func(‘zem_contact’, Array, ‘\n\t<txp:zem_cont…’) #2 /var/www/mydomain.com/html/textpattern/lib/txplib_publish.php(557): Textpattern\Tag\Registry->process(‘zem_contact’, Array, ‘\n\t<txp:zem_cont…’) #3 /var/vhosts/mydomain.com/html/textpattern/lib/txplib_publish.php(447): processTags(‘zem_contact’, ‘to=“foo@g…’, ‘\n\t<txp:zem_cont…’) #4 /var/www/mydomain.com/html/textpattern/publish/taghandlers.php(2924): parse(‘<p>For informat…’) #5 /var/www/mydomain.com/html/textpattern/publish/taghandlers.php(2958): txp_sandbox(Array, NULL) #6 [internal function]: body(Array, NULL) #7 /var/www/mydomain.com/html/textpattern in /var/www/mydomain.com/html/textpattern/plugins/zem_contact_reborn/zem_contact_reborn.php on line 46

I’ve seen that this problem shows up from time to time and, from what I can tell, the usual fix is to downgrade either PHP or textpattern. All of my versions are pretty much current, so I’m assuming there’s a better solution than that. What’s the recommended method for avoiding the undefined function mysql_real_escape_string() error?

Thanks!

Offline

#2 2020-09-20 15:52:09

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Upgrading from 4.8.2 to 4.8.3

Hi
zem_contact_reborn has been replaced with com_connect. Re the htaccess file, maybe it has to do with your hosting environment but hopefully there will be a fix proposed in the forum.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2020-09-20 17:03:06

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Upgrading from 4.8.2 to 4.8.3

ps. As far as I know the htaccess in the textpattern directory should be behaving ok as the rule sits between IfModule conditionals. However you can still slightly obfuscate the content of the directories contained within textpattern, by adding a simple index.html document containing search engine blocking rules such as <meta name="Robots" content="noindex,nofollow" />, <meta name="revisit-after" content="the sun freezes" /> etc, and a body with just a basic link back to your homepage.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2020-09-20 17:12:18

awarnock
New Member
Registered: 2020-09-05
Posts: 8

Re: Upgrading from 4.8.2 to 4.8.3

Thanks for the info about the plugin. I’ll give com_connect a try.

As far as the .htaccess issue, I needed to add Options to the AllowOverride directive in the virtual host config file. It’s all good now. Thanks for the help.

Offline

#5 2020-09-21 15:12:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Upgrading from 4.8.2 to 4.8.3

awarnock wrote #325975:

What’s the recommended method for avoiding the undefined function mysql_real_escape_string() error?

Yes, in PHP7 the mysql_… functions were replaced by mysqli_… with an i (or other alternative methods). com_connect already does that for zen_contact_reborn and can be used as a direct replacement. There are some handy zem_contact_reborn -> com_connect migration instructions (tip: it’s easy) for painlessly making the switch.


TXP Builders – finely-crafted code, design and txp

Offline

#6 2020-09-21 15:24:19

awarnock
New Member
Registered: 2020-09-05
Posts: 8

Re: Upgrading from 4.8.2 to 4.8.3

Thanks. I’ve done that and com_connect seems to be working fine for me. Thanks for the help.

I’m just hosting the site for a friend. I noticed that his designer last logged in back in 2012, so it’s been stable for 8 years. Not a bad time to catch up and it hasn’t been all that difficult. Much appreciated.

Offline

#7 2020-09-21 19:36:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Upgrading from 4.8.2 to 4.8.3

awarnock wrote #325984:

Thanks. I’ve done that and com_connect seems to be working fine for me. Thanks for the help.

I’m just hosting the site for a friend. I noticed that his designer last logged in back in 2012, so it’s been stable for 8 years. Not a bad time to catch up and it hasn’t been all that difficult. Much appreciated.

Yeah, the PHP 5->7 shift threw a lot of sites out and if you search for some typical error messages on the web, there are quite a few no longer attended sites.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2020-09-23 01:12:21

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Upgrading from 4.8.2 to 4.8.3

I use identical Textpattern installations at different providers, version 4.8.3 and PHP 7.4.10. At one of the providers there are problems saving the articles. After several attempts to solve the problem I found out that it has to do with the latest version of the bot_write_tab_customize plug-in. The console shows the following, only if the plug-in is activated.

What has this to do with the provider, why it works for some providers and not for one?

Warnings:

jQuery.Deferred exception: allForms is not defined ReferenceError: allForms is not defined
    at HTMLSelectElement.<anonymous> (https://domain.ch/textpattern/textpattern.js:2082:23)
    at HTMLElement.dispatch (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:43090)
    at HTMLElement.v.handle (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:41074)
    at Object.trigger (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:71513)
    at HTMLSelectElement.<anonymous> (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:72108)
    at Function.each (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:2976)
    at S.fn.init.each (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:1454)
    at S.fn.init.trigger (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:72084)
    at S.fn.init.S.fn.<computed> [as change] (https://domain.ch/textpattern/vendors/jquery/jquery/jquery.js:2:88549)
    at HTMLDocument.<anonymous> (https://domain.ch/textpattern/index.php?event=article&step=edit&ID=35&_txp_token=5ac45a1ad7f790b347f79e5cfb288f6a:442:12) undefined

Errors:

Uncaught ReferenceError: allForms is not defined
    at HTMLSelectElement.<anonymous> (textpattern.js:2082)
    at HTMLElement.dispatch (jquery.js:2)
    at HTMLElement.v.handle (jquery.js:2)
    at Object.trigger (jquery.js:2)
    at HTMLSelectElement.<anonymous> (jquery.js:2)
    at Function.each (jquery.js:2)
    at S.fn.init.each (jquery.js:2)
    at S.fn.init.trigger (jquery.js:2)
    at S.fn.init.S.fn.<computed> [as change] (jquery.js:2)
    at HTMLDocument.<anonymous> (index.php?event=article&step=edit&ID=35&_txp_token=5ac45a1ad7f790b347f79e5cfb288f6a:442)

Offline

Board footer

Powered by FluxBB