Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2016-09-02 08:28:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

phiw13 wrote #300941:

this Sandspace mockup

I like that! Very neat and collapses logically on mobile too. Maybe we could steal *ahem* plagiarise *cough* pay homage to that in Hive.

Failing that, note to self: install Sandspace in future.


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

#22 2016-09-02 08:33:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

phiw13 wrote #300940:

User_Error "Illegal mix of collations for operation 'like'"... Charset (default/config): latin1/utf8mb4

Thanks for the info. I suspect the charset might be the issue and why I can’t replicate it on mine. For some reason your database appears to have different collations on some tables compared with the connection (or different collation on other tables joined together in the search query).

I wonder if the upgrade assumed you were using utf8, forced utf8mb4 on you, when you were actually previously using latin1 or something. Not sure, it’s not my area of expertise.

As for it not finding things in non-latin character sets, I’ll have to do some digging. It’s finding articles with titles containing such language strings for me…

EDIT: actually, could you please temporarily hack your textpattern/include/txp_list.php file. Find line 214ish (in beta.3) and change the line to read:

$total = getThing("SELECT COUNT(*) FROM $sql_from WHERE $criteria", 1);

Adding the ,1 on the end will dump the query it’s using to the page. So when you visit the Articles panel you’ll see it there. Running a search will show you what the query is trying to match. For example, my one says:

SELECT COUNT(*) FROM textpattern textpattern
        LEFT JOIN txp_category category1 ON category1.name = textpattern.Category1 AND category1.type = 'article'
        LEFT JOIN txp_category category2 ON category2.name = textpattern.Category2 AND category2.type = 'article'
        LEFT JOIN txp_section section ON section.name = textpattern.Section
        LEFT JOIN txp_users user ON user.name = textpattern.AuthorID WHERE textpattern.Title like '%льби%' or textpattern.Body like '%льби%' or textpattern.Excerpt like '%льби%'

and that matches my test article which has part of its title as Альбина. What does yours report? And does it give any more detailed error info if you run that query from phpMyAdmin? Does the output change / error go away if you alter the search locations to only include Title, Body and Excerpt?

Last edited by Bloke (2016-09-02 08:41:00)


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

#23 2016-09-02 10:15:58

testdeputy
Member
Registered: 2011-05-29
Posts: 27

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

fresh install, can’t get any further than admin languages page..?
seems related to line 237 of <snipped>textpattern-4.6.0-beta.3/textpattern/update/_to_4.6.0.php
table txp_token is not created…

User_Error "You have an error in your SQL syntax;
check the manual that corresponds to your MariaDB server version
for the right syntax to use near 'TYPE = MyISAM' at line 11"
in <snipped>/textpattern/lib/txplib_db.php at line 405.
textpattern/lib/txplib_misc.php:1677 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:405 trigger_error()
textpattern/lib/txplib_db.php:778 safe_query()
textpattern/update/_to_4.6.0.php:238 safe_create()
textpattern/update/_update.php:84 include()
textpattern/index.php:180 include()

Last edited by testdeputy (2016-09-02 10:29:31)

Offline

#24 2016-09-02 10:54:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

testdeputy wrote #300947:

table txp_token is not created…

Sounds like it’s incorrectly identifying your MySQL version (MariaDB in your case) and using TYPE= instead of ENGINE= when creating tables.

Can you quickly hack your textpattern/lib/txplib_db.php please. Add this after line 213 (just after it allocates the $version value):

var_dump($version, intval($version[0]), preg_match('#^4\.(0\.[2-9]|(1[89]))|(1\.[2-9])#', $version));

Then refresh your admin side. You should see three values output near the top of the page. What are they?


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

#25 2016-09-02 11:18:54

testdeputy
Member
Registered: 2011-05-29
Posts: 27

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

in response to Bloke’s Q: what are they?
string(15) “10.0.20-MariaDB” int(1) int(0)

Offline

#26 2016-09-02 11:28:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

testdeputy wrote #300949:

string(15) “10.0.20-MariaDB” int(1) int(0)

Bingo. It’s comparing the first digit (a 1) against a 5 instead of using the first major revision number or employing version_compare(). Although we don’t officially support MariaDB, I’ll fix that as it’ll break when (if) MySQL itself goes above version 9. Thanks for the report.

EDIT: fixed.

Last edited by Bloke (2016-09-02 11:40:30)


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

#27 2016-09-02 11:51:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

colak wrote #300943:

The txp_img folder is excluded in the b3 archive.Is there a reason for that?

Probably because we don’t use it any more. I didn’t notice, but it’s not in the repo and probably hasn’t been for a while now. If it was in beta.2, maybe whoever built the package still had it on their local machine.

It shouldn’t overwrite anything if you’re using it already (e.g. for MLP) since it’s not included in the repo, as long as OSX doesn’t do weird things.


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

#28 2016-09-02 11:56:53

testdeputy
Member
Registered: 2011-05-29
Posts: 27

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

Bloke wrote #300950:

.. I’ll fix that as it’ll break when (if) MySQL itself goes above version 9.

fix
thanks, works!

Offline

#29 2016-09-02 12:20:44

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,546
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

Bloke wrote #300946:

I wonder if the upgrade assumed you were using utf8, forced utf8mb4 on you, when you were actually previously using latin1 or something. Not sure, it’s not my area of expertise.

Actually I tested with two different local installs, one is fairly old (latin1/utf8), the other one has been there since summer (latin1/utf8mb4). But I think that is a distraction.

EDIT: actually, could you please temporarily hack your textpattern/include/txp_list.php file. Find line 214ish (in beta.3) and change the line to read:

$total = getThing("SELECT COUNT(*) FROM $sql_from WHERE $criteria", 1);…

with only Title, Body and Excerpt checked:

SELECT COUNT(*) FROM textpattern textpattern
        LEFT JOIN txp_category category1 ON category1.name = textpattern.Category1 AND category1.type = 'article'
        LEFT JOIN txp_category category2 ON category2.name = textpattern.Category2 AND category2.type = 'article'
        LEFT JOIN txp_section section ON section.name = textpattern.Section
        LEFT JOIN txp_users user ON user.name = textpattern.AuthorID WHERE textpattern.Title like '%ノクターン%' or textpattern.Body like '%ノクターン%' or textpattern.Excerpt like '%ノクターン%'

And the offending articles are found (both title and body contain the string). Other searches, where the string only exists in body or keywords works fine.

The problem only seems to happen when “Search All” is checked in the dropdown – nothing is found and the mentioned error is flagged. Searching with Title, Body and Excerpt checked, or with additional criteria (Keywords, Author, Section, Categories) works fine.

Actually, include things like ID, Posted, Modified as criteria and the error pops up; of course, the given string (ノクターン) is non-sensical for those 3 criteria (but then, the same can be said of a string using Roman characters).

Offline

#30 2016-09-02 12:25:55

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,546
Website

Re: Feedback to: Textpattern CMS 4.6.0 beta 3 released

Bloke wrote #300945:

I like that! Very neat and collapses logically on mobile too. Maybe we could steal ahem plagiarise cough pay homage to that in Hive.

:-)

Failing that, note to self: install Sandspace in future.

It is not a bad theme… a quiet environment for a rainy day or scorching hot afternoon… Goes well with the music

Offline

Board footer

Powered by FluxBB