Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-01-15 22:53:04

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Upgrade from 4.4.1

Sorry to be a too intermittent Textpattern user. I am impressed, though, that txp seems to be still going strong an nicely, for some twenty years, congratulations!

Moving to a php7 web host, I succeeded to see my old 4.4.1 txp online after downgrading to php5.6 (the oldest available), and my host kindly changed a ‘yield()’ function definition to ‘yieldd()’ (perhaps not frequently used). But, now in article edit mode, there is an AMOUNT of (mostly non-fatal) errors produced, so there is an urgent need for upgrade. Is there somebody having an advice, how to proceed? Is there some preferred stepping, through txp and php upgrades?

Ultimately, there may be an option to activate another parallel php version, then copy contents to a new txp installation, but I haven’t yet investigated the consequences.

Please advice me,
Tore

Offline

#2 2021-01-16 12:01:08

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Upgrade from 4.4.1

Thanks for your appreciation and welcome back. Much of recent development was forced by php/mysql changes, so there is almost no hope you would be able to stay with txp 4.4.1.

I would suggest disabling plugins, logging out, upgrading to 4.8.4 under php 5.6 (log in to trigger upgrade), then switching to php 7 (backup first, as usual). If everything looks fine, enable plugins again. Most of them could break, but it’s another story.

Good luck!

Offline

#3 2021-01-16 16:01:52

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

Re: Upgrade from 4.4.1

Just wanted to add that although most plugins will indeed break, many are no longer needed and some can be easily updated. Do revisit this thread if you need further help.


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 2021-01-16 20:37:47

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: Upgrade from 4.4.1

Thank you so far, I’ll go on next week! Seems to be no big problem … :)

Offline

#5 2021-01-22 22:28:46

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: Upgrade from 4.4.1

Now I have upgraded to 4.8.4, quite smoothly. One thing remains, which I cannot figure out a possible reason among file/DB permissions etc..:
I cannot save a template update (Presentation > Pages|Forms, pressing the Save button brings not even a diagnostic), while saving an updated article (Content > Write, then Save) updates nicely, reporting Article posted, quite correctly.
How is that possible?

Offline

#6 2021-01-23 12:19:40

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Upgrade from 4.4.1

Any clue in the browsers network console?

Offline

#7 2021-01-23 12:46:57

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: Upgrade from 4.4.1

Firefox 84.0.2, cannot imagine how?? Btw, Chrome 87.0.4… equally.
Secret Mixed content blocking?

Last edited by tore (2021-01-23 13:03:05)

Offline

#8 2021-01-23 15:41:02

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

Re: Upgrade from 4.4.1

Can you send us your diagnostics? Do you have any rules that may be blocking something in the htaccess file?

Also, did you upload the themes folder in your home directory?


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

Offline

#9 2021-01-23 16:25:27

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: Upgrade from 4.4.1

Thanks for attention! Where can I find any further diagnostics? Regarding .htaccess:

$ find . -type f -name ".htaccess"
./textpattern/.htaccess
./themes/.htaccess
./.htaccess
$ cat ./.htaccess
# BEGIN Textpattern

#DirectoryIndex index.php index.html

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Enable the `FollowSymLinks` option below if it isn't already.
    #Options +FollowSymlinks

    #RewriteBase /relative/web/path/

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*) index.php

    RewriteCond %{HTTP:Authorization}  !^$
    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

<IfModule mod_mime.c>
    AddType image/svg+xml  svg svgz
    AddEncoding gzip       svgz
</IfModule>

# For additional Apache-compatible web server configuration settings to enhance
# site performance and security, we recommend:
# https://github.com/h5bp/server-configs-apache/blob/master/dist/.htaccess

# END Textpattern
$ cat ./textpattern/.htaccess
# BEGIN Textpattern

# Block access to directories without a default document.

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# END Textpattern
$ cat ./themes/.htaccess
# BEGIN Textpattern

# Block access to directories without a default document.

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# Inhibit direct file downloads.

RewriteRule .*\.txp$ - [R=403,L]

# END Textpattern

The themes folder has no other content than the .htaccess file. That’s all I can present, sorry.
May the access to MySQL (actually a MariaDB substitute) have differing rules for admin work?

Last edited by tore (2021-01-23 16:26:20)

Offline

#10 2021-01-23 16:44:00

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Upgrade from 4.4.1

Since saving articles seems to be ok, the problem must be related to themes. What is in Presentation/Themes tab?

To access the browser console, look for ‘Dev Tools’ (or similar’) in the browser menu and open ‘Network’. Then try to save a page/form and look at the servers response.

Offline

#11 2021-01-23 19:07:22

tore
Member
From: Tväråmark, Sweden
Registered: 2006-11-08
Posts: 26

Re: Upgrade from 4.4.1

Ok, now I have investigated the “browswer consoles” (thanks!) and Chrome has these complaints

Uncaught SyntaxError: Unexpected token '<'
    at b (jquery.js:formatted:48)
    at Function.globalEval (jquery.js:formatted:152)
    at text script (jquery.js:formatted:3940)
    at jquery.js:formatted:3750
    at l (jquery.js:formatted:3762)
    at XMLHttpRequest.<anonymous> (jquery.js:formatted:3899)

and Firefox these:

Uncaught SyntaxError: expected expression, got '<'
    jQuery 8
    sendAsyncEvent https://tores.se/toretank/textpattern/textpattern.js:620
    txpAsyncForm https://tores.se/toretank/textpattern/textpattern.js:1057
    jQuery 8
    txpAsyncForm https://tores.se/toretank/textpattern/textpattern.js:1004
    <anonymous> https://tores.se/toretank/textpattern/textpattern.js:2615
    jQuery 13

when I try saving the ‘default’ page template at the Presentation > Pages tab.

In contrary, the ‘error_default’ template may be successfully saved without complaints and generates the green ‘Pages updated:’ message. My ‘default’ page is

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="<txp:css />" type="text/css" media="screen" />
	<title><txp:page_title /></title>
<!-- http://svensk.lemonad.org/ -->
  <meta name="SweBlogGeo.city" content="-3475056" />
  <meta name="SweBlogGeo.desc" content="<txp:page_title /> Tväråmark" />
</head>
<body>
<!--
<div id="accessibility">
  <a href="#content" title="Go to content">Go to content</a> 
  <a href="#sidebar-1" title="Go to navigation">Go to navigation</a> 
  <a href="#sidebar-2" title="Go to search">Go to search</a> 
  <a href="http://bloggkartan.se/registrera/25500/tvaeraamark/">Tväråmark</a>
</div> --> <!-- /accessibility -->

<div id="container">

<!-- head -->
<div id="head">
<!-- h1><txp:link_to_home><txp:site_name /></txp:link_to_home></h1 -->
<h1><a href="<txp:site_url />" title="Visa alla artiklar från alla avdelningar"><txp:site_name /></a></h1>
<h2><txp:site_slogan /></h2>

</div>

<div id="topleft">
<txp:image id="5" />
</div>

<div id="topright">
	<txp:search_input button="sök" label="Söktext" wraptag="span" />
<!--	<txp:popup type="c" label="Välj ämne"  wraptag="p" /> -->
	<a href="javascript:window.scroll(0,0)"><small>&nbsp;Upp&nbsp;</small></a>
	<a href="javascript:window.scroll(0,100000)"><small>&nbsp;Ned&nbsp;</small></a>
	<a href="javascript:window.scroll(0,100000);window.scroll(0,window.pageYOffset/2)"><small>&nbsp;Mittemellan&nbsp;</small></a>
</div>

<!-- left -->
<div id="sidebar-1">
<!-- ************************************** -->
<p>Avdelningar:&nbsp;
<txp:section_list break="br" include_default="1" default_title="Visa båda" active_class="activesec"  exclude="om-toretaenk" />&nbsp;</p>

<txp:popup type="c" this_section="1" label="Ämne &ndash; inget&nbsp;=&nbsp;alla:"  wraptag="p" />
<p>&nbsp;</p>

<txp:if_individual_article>

<p>
Nästa artikel<br />
<txp:link_to_next><txp:title /></txp:link_to_next><br /><br />&nbsp;
Föregående artikel<br />
<txp:link_to_prev><txp:title /></txp:link_to_prev><br />&nbsp;<br />
</p>

<p>Senaste artiklarna<br />
<txp:link_to_home>&ndash; översikt</txp:link_to_home></p>

<txp:else />
	<p>Senaste&nbsp; artiklarna</p>

    <!-- txp:if_article_section name="Allmänt" -->
	<p>Allmänt:&nbsp;</p>
	<txp:recent_articles section="allmaent" limit="5" label="" wraptag="p" />
    <!-- /txp:if_article_section -->

    <!-- txp:if_article_section name="datorbruk" -->
	<p>Datorbruk:&nbsp;</p>
	<txp:recent_articles section="datorbruk" limit="5" label="" wraptag="p" />
    <!-- /txp:if_article_section -->
</txp:if_individual_article>

<!-- Bloggtoppen.se -->
<!--  /Bloggtoppen.se -->

<p>&nbsp;<br />Länkar&nbsp;</p>
	<txp:linklist category="extern" wraptag="p" />

<p>
<img id="info" style="display:inline;vertical-align:top" src="<txp:site_url />textpattern/txp_img/info.gif" alt="Information" title="Information" />
<txp:section_list active_class="activesec"  exclude="allmaent,datorbruk" />&nbsp;<br /></p>


	<txp:linklist category="textpattern" wraptag="p" />

<p>

<!-- remove validate, rss, atom

<img id="validxhtml" style="display:inline" src="<txp:site_url />textpattern/txp_img/xhtml10.gif" alt="XHTML 1.0" title="XHTML 1.0" />
        <a href="http://validator.w3.org/check?uri=referer" title="Valid XHTML 1.0 Transitional?">Validera</a>&nbsp;<br />

<img id="rssfeed" style="display:inline" src="<txp:site_url />textpattern/txp_img/rss.gif" alt="RSS feeds" title="Välj RSS eller Atom" />
	<txp:feed_link label="RSS" limit="8" />/<txp:feed_link label="Atom" flavor="atom" limit="8" /><br />

-->

&copy; Tore Ericsson och andra inläggsförfattare<br />

<a href="http://textpattern.com" title="Motor: Textpattern"><img id="txpad" src="<txp:site_url />textpattern/txp_img/txp_slug105x45.gif" alt="Motor: Textpattern" /></a></p>
</div>

<!-- right -->
<div id="sidebar-2">
<!--
	<txp:search_input label="Sök" wraptag="p" />
	<txp:popup type="c" label="Bläddra" wraptag="p" />

	<p><txp:feed_link label="RSS" /> / <txp:feed_link label="Atom" flavor="atom" /></p>




	<p><img src="textpattern/txp_img/txp_slug105x45.gif" alt="textpattern" /></p>
-->
</div>

<!-- center -->
<div id="content">

<txp:article sort="Posted desc" />

<!-- 
<txp:if_individual_article>
<p>
<span class="emcaps">föregående:</span>&nbsp;<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>&nbsp;&nbsp;

<span class="emcaps">nästa:</span>&nbsp;<txp:link_to_next><txp:next_title /></txp:link_to_next> 
</p> 
</txp:if_individual_article>
--> 

<txp:if_article_list>
<p>
<txp:older>Äldre artiklar</txp:older> &nbsp;
<txp:newer>Nyare artiklar</txp:newer>
</p>
</txp:if_article_list>

<!-- footer -->
<div id="foot">&nbsp;&nbsp;</div>

</div>

</div> <!-- /container -->

</body>
</html>

You may wonder how I did some recent modifications (mostly using ‘<!— ‘ etc.) when I couldn’t: I made them directly in the MySQL table using phpMyAdmin, since that was my only option. Thanks again for this advice, since now I think we are approaching the solution! / Tore

PS Those browser outputs are folded; Chrome may show also significant Jquery JS code rows, which I will send on request.

Last edited by tore (2021-01-23 19:11:51)

Offline

#12 2021-01-23 20:13:10

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Upgrade from 4.4.1

Unexpected token '<'

probably means there is some error (core or plugin) interfering with JS response, please inspect. What you should normally get is

;
textpattern.Console.addMessage(["Forms updated: <strong>body_aside</strong>.",0]);
...

Offline

Board footer

Powered by FluxBB