Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2014-09-23 14:38:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Feedback to: Textpattern CMS 4.5.7 released

FileMerge is showing me that there are 9 differences between the Chrome and Safari downloads of the same file. The differences start about 25% of the way into the file. Same file size, though.

More weirdness when the files are gunzip’d. Before:

$ ls -al *.gz
-rw-r-----@ 1 pete  admin  554344 23 Sep 15:15 chrome-textpattern-4.5.7.tar.gz
-rw-r--r--  1 pete  admin  553961 23 Sep 15:15 curl-textpattern-4.5.7.tar.gz
-rw-r--r--@ 1 pete  admin  554343 23 Sep 15:15 firefox-textpattern-4.5.7.tar.gz
-rw-r--r--@ 1 pete  admin  554344 23 Sep 15:14 safari-textpattern-4.5.7.tar.gz

After a gunzip *.gz:

$ ls -al *.tar
-rw-r-----  1 pete  admin   553961 23 Sep 15:15 chrome-textpattern-4.5.7.tar
-rw-r--r--  1 pete  admin  2117632 23 Sep 15:15 curl-textpattern-4.5.7.tar
-rw-r--r--  1 pete  admin   553961 23 Sep 15:15 firefox-textpattern-4.5.7.tar
-rw-r--r--  1 pete  admin   553961 23 Sep 15:14 safari-textpattern-4.5.7.tar

Note the file size of curl-textpattern-4.5.7.tar. The other three .tar files are identical:

$ md5 *.tar
MD5 (chrome-textpattern-4.5.7.tar) = fd174b6ebf8672771a2b6bdaf448d7d8
MD5 (curl-textpattern-4.5.7.tar) = a6bc8f19e6770ebd3677095824a56f0d
MD5 (firefox-textpattern-4.5.7.tar) = fd174b6ebf8672771a2b6bdaf448d7d8
MD5 (safari-textpattern-4.5.7.tar) = fd174b6ebf8672771a2b6bdaf448d7d8

Running tar -xvzf against each file spits out the right directory structure here – I don’t see the phantom directory, Stef. Running diff -rq across the directories only shows Mac-specific stuff (.DS_Store files) that I would expect to see, so that’s all good. The @ sign in the file permissions area is an indication that the file has extended attributes, and the curl’d version not having any makes perfect sense.

Back to the original downloads. Removing the extended attributes with xattr -c *.gz still shows differing file sizes:

$ ls -al *.gz
-rw-r-----  1 pete  admin  554344 23 Sep 15:15 chrome-textpattern-4.5.7.tar.gz
-rw-r--r--  1 pete  admin  553961 23 Sep 15:15 curl-textpattern-4.5.7.tar.gz
-rw-r--r--  1 pete  admin  554343 23 Sep 15:15 firefox-textpattern-4.5.7.tar.gz
-rw-r--r--  1 pete  admin  554344 23 Sep 15:14 safari-textpattern-4.5.7.tar.gz

…and the revised md5 sums for completeness:

$ md5 *.gz
MD5 (chrome-textpattern-4.5.7.tar.gz) = 6ae22896fd75c45c9ef43d2e63381940
MD5 (curl-textpattern-4.5.7.tar.gz) = fd174b6ebf8672771a2b6bdaf448d7d8
MD5 (firefox-textpattern-4.5.7.tar.gz) = 04fcfd6d5699537bf72aac48cc1139eb
MD5 (safari-textpattern-4.5.7.tar.gz) = 931f49555f07d8b09438f2d8b64a43a1

Two of those are new, two are as before.

Offline

#50 2014-09-23 16:20:34

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Feedback to: Textpattern CMS 4.5.7 released

Looks like Chrome (and perhaps Safari as well) are gzipping the file a second time, because if you decompress it once, you get the same md5 checksum as the other downloads have:

fd174b6ebf8672771a2b6bdaf448d7d8  textpattern-4.5.7-chrome.tar
7b63308b3420eca4c8512ea600dfcab0  textpattern-4.5.7-chrome.tar.gz
fd174b6ebf8672771a2b6bdaf448d7d8  textpattern-4.5.7-firefox.tar.gz
fd174b6ebf8672771a2b6bdaf448d7d8  textpattern-4.5.7-wget.tar.gz
-rw-r----- 1 ruud ruud 553961 Sep 23 18:17 textpattern-4.5.7-chrome.tar
-rw-r----- 1 ruud ruud 554344 Sep 23 18:17 textpattern-4.5.7-chrome.tar.gz
-rw-r--r-- 1 ruud ruud 553961 Sep 23 18:10 textpattern-4.5.7-firefox.tar.gz
-rw-r--r-- 1 ruud ruud 553961 Sep 23 18:10 textpattern-4.5.7-wget.tar.gz

Chrome and Firefox both running in Linux.

Offline

#51 2014-09-23 17:31:10

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Feedback to: Textpattern CMS 4.5.7 released

ruud wrote #284133:

Looks like Chrome (and perhaps Safari as well) are gzipping the file a second time, because if you decompress it once, you get the same md5 checksum as the other downloads have:

That does make sense, actually. FileMerge was reporting small patterns with identical repeating characters (like ^^ ^ that could be compressed a byte further.

Offline

#52 2014-09-24 20:57:53

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Feedback to: Textpattern CMS 4.5.7 released

I’ve found something interesting trying to upgrade one site from Textpatter 4.5.5: A whole mess of “Undefined variable” errors related to one specific form. I have verified that when I comment out the form contents using txp:hide, all the errors go away. Here is the form:

<txp:variable name="has_prev"><txp:link_to_prev/></txp:variable>
<txp:variable name="has_next"><txp:link_to_next/></txp:variable>
<txp:if_variable name="has_prev" value="">
  <txp:else/>
  <txp:if_variable name="has_next" value="">
    <txp:else/>
    <txp:variable name="has_next_AND_prev" value="1"/>
  </txp:if_variable>
</txp:if_variable>
<nav class='adjascent-article-nav'>
  <txp:link_to_prev>
    &lsaquo; Previous <txp:yield/>
  </txp:link_to_prev>
  <txp:if_variable name="has_next_AND_prev" value="1">
    |
  </txp:if_variable>
  <txp:link_to_next>
    Next <txp:yield/> &rsaquo;
  </txp:link_to_next>
</nav>

This form worked perfectly—as far as I could see—under Textpattern 4.5.5, but now pages that use it are flooded with error messages like the following:

Tag error: <txp:link_to_prev/> ->  Notice: Undefined index: sort while parsing form _adjascent_article_nav on page default
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()
textpattern/lib/txplib_publish.php:339 processTags()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: expired while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: id while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: id while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: time while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: time while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: keywords while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

Tag error: <txp:link_to_prev/> ->  Notice: Undefined variable: keywords while parsing form _adjascent_article_nav on page default
textpattern/lib/txplib_publish.php:273 getNeighbour()
textpattern/publish/taghandlers.php:1444 getNextPrev()
textpattern/lib/txplib_publish.php:426 link_to_prev()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:4528 parse()
textpattern/lib/txplib_publish.php:426 variable()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:1974 parse()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()

...

Is there something inappropriate in my form? Is there anything I can do to fix it?

Offline

#53 2014-09-24 21:52:52

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Feedback to: Textpattern CMS 4.5.7 released

P.S. I’m not in an emergency situation here—I follow the instructions about backups before upgrades, and I was verifying the upgrade on my development server before making it live on the public Internet.

Offline

#54 2014-09-25 02:54:08

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Feedback to: Textpattern CMS 4.5.7 released

johnstephens wrote #284168:

Is there something inappropriate in my form? Is there anything I can do to fix it?

I switched out the original navigation code at likelikebaby.com with yours.

If I put it the code directly in the archives page, I get

Tag error: <txp:yield/> ->  Warning: end() expects parameter 1 to be array, null given while parsing form None on page archive

every time Previous and Next appear – you can see it if you go over there. When I put it in a Miscellaneous Form, it was error free.

Not sure if that helps or not.

Offline

#55 2014-09-25 08:53:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: Feedback to: Textpattern CMS 4.5.7 released

johnstephens wrote #284168:

Is there something inappropriate in my form? Is there anything I can do to fix it?

Nothing wrong with your Form, per se. The problem is likely because your link_to_next/link_to_prev tags occur before your <txp:article> tag.

As michaelkpate notes, if you embed the _adjascent_article_nav in your default Form, the errors will go away, because the (internal) variables that Txp complains about are set up by then.

This is an unfortunate side effect of the fact the tag parser works in a linear fashion. Some tags just have to go after or during an article (another anomaly is trying to get a search result count without first using an article tag). Come the revolution we’ll alter the parser to address this by putting some forward-looking logic in there. But for now, you have a couple of options:

  1. (recommended) Move the Form’s inclusion somewhere after/during an article tag in your page flow.
  2. Add <txp:article pgonly="1" /> somewhere before the inclusion of the Form, but be aware this has a performance penalty as it’ll call the database twice.

Having said all that, I believe the fact it now throws the warnings is possibly a slight regression from 4.5.5 so thank you for raising this. We’ll investigate.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#56 2014-09-25 18:37:47

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Feedback to: Textpattern CMS 4.5.7 released

Thank you, Stef! I checked, and _adjascent_article_nav is called within my default article form, and only within that form.

Today I see that the error messages only come up in Debugging mode, so I’m going to deploy the update. In Testing and Live, the error messages vanish, and the navigation seems to work flawlessly.

[Edit: Fix Textile syntax]

Last edited by johnstephens (2014-09-25 18:39:59)

Offline

#57 2014-09-25 19:18:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: Feedback to: Textpattern CMS 4.5.7 released

johnstephens wrote #284197:

I checked, and _adjascent_article_nav is called within my default article form, and only within that form.

Well that is baffling. When I tried it outside article context (i.e. in the Page template) I got the errors you noted, and then some. But when I moved the <txp:output_form /> tag into the default Form, the errors went away. If you’re still getting them inside the Form then it has me stumped. I’d probably need to look at your installation a bit closer to figure this one out unless anyone else has any nuggets of awesome to add.

As you found, they’re only undeclared variable warnings so will do no harm to the site’s operation, but are still somewhat of an annoyance when debugging.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#58 2014-09-26 09:52:02

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

Re: Feedback to: Textpattern CMS 4.5.7 released

Back to OP: the update went smooth, save for There is a problem trying to connect to the RPC server. Please, try again later.

Offline

#59 2014-09-26 10:00:17

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: Feedback to: Textpattern CMS 4.5.7 released

I wonder if the mass upgrade brought on a mini DoS on the RPC server – is that viable? I don’t know the technical specs of the server, so have no evidence or basis for this suggestion.

Offline

#60 2014-09-26 12:04:49

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Feedback to: Textpattern CMS 4.5.7 released

I doubt it was a DoS, we use about 1% capacity of our server most of the time.

Offline

Board footer

Powered by FluxBB