Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2024-04-11 19:52:11

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 200
Website

Re: Big upgrade jump

Ah, that was the issue. Now it all works on 4.8.8! I had to re-enable rah_nocache, as the admin side complained on every page load.

I then tried to upgrade to php 8.0. I got this lovely error:

Fatal error: Uncaught Error: Undefined constant "MYSQLI_CLIENT_FOUND_ROWS" in /textpattern/lib/txplib_db.php:169 Stack trace: #0 /textpattern/lib/txplib_db.php(288): DB->__construct() #1 /textpattern/publish.php(44): include_once('...') #2 l/index.php(69): include('/home/skewrayc/...') #3 {main} thrown in /textpattern/lib/txplib_db.php on line 169

(I removed the absolute paths to www/.) Is this cbs_category_list breaking?

Last edited by skewray (2024-04-11 19:53:04)

Offline

#38 2024-04-11 20:28:57

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

Re: Big upgrade jump

I saw that appear once earlier this evening on your site but on reload couldn’t make it happen again. I don’t see that anywhere now on your site (but you may have switched back). If you google for that error on the forum or elsewhere, it suggests you don’t have mysqli set up on your server but then the whole site wouldn’t work. If that is the case, check that for your PHP 8+ combination, mysqli is included. On some hosts you may have to set an extra checkbox for that.

If it was cbs_category_list, the error should mention it. It does do a combined query to get the categories and their article counts, but it’s not doing anything strange as far as I can see.

FWIW, this is plugin code:

/*
   cbs_category_list v0.9
   by Christophe Beyls [http://www.digitalia.be]
*/

if (class_exists('\Textpattern\Tag\Registry')) {
    Txp::get('\Textpattern\Tag\Registry')
        ->register('cbs_category_list');
}

function cbs_category_list($atts)
{
	global $s, $c;

	extract(lAtts(array(
		'label'    => '',
		'labeltag' => '',
		'break'    => 'br',
		'wraptag'  => '',
		'parent'   => '',
		'posted'   => '',
		'section'  => $s,
		'sticky'   => '',
		'showcount'=> '',
		'class'    => __FUNCTION__,
		'activeclass'=> ''
	),$atts));

	$parent = ($parent) ? " AND c.parent = '$parent'" : '';
	$showcount = ($showcount == 'true') ? ', COUNT(*) AS count' : '';
	$sticky = ($sticky == 'true') ? '5' : '4';

	switch($posted) {
		case 'all':
			$posted = '';
			break;
		case 'future':
			$posted = ' AND t.Posted >= now()';
			break;
		default:
			$posted = ' AND t.Posted < now()';
	}

	if($section == 'default') {
		$table = ', `'.PFX.'txp_section` AS s';
		$sqlsection = 's.name AND s.on_frontpage = 1';
	} else {
		$table = '';
		$sqlsection = "'$section'";
	}

	$rs = startRows(
	  'SELECT c.name, c.title'.$showcount.' FROM `'.PFX.'txp_category` AS c, `'.PFX.'textpattern` AS t'.$table
	  .' WHERE (c.name = t.Category1 OR c.name = t.Category2) AND c.type = \'article\' AND t.Section = '.$sqlsection.$parent.$posted
	  .' AND t.Status = '.$sticky.' GROUP BY c.name ORDER BY c.title'
	);
	if(!$rs)
		return '';

	$count = '';
	$out = array();
	while($a = nextRow($rs)) {
		extract($a);
		$out[] = tag(str_replace('& ','&#38; ', $title), 'a', ' href="'.pagelinkurl(array('c'=>$name, 's'=>$section))
				.(($activeclass && ($s == $section) && ($c == $name)) ? '" class="'.$activeclass.'"' : '"')).($count ? ' ('.$count.')' : '');
	}
	return doLabel($label, $labeltag).doWrap($out, $wraptag, $break, $class);
}

TXP Builders – finely-crafted code, design and txp

Offline

#39 2024-04-11 20:30:56

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

Re: Big upgrade jump

skewray wrote #337081:

I had to re-enable rah_nocache, as the admin side complained on every page load.

What does it complain about?


TXP Builders – finely-crafted code, design and txp

Offline

#40 2024-04-12 07:06:31

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 200
Website

Re: Big upgrade jump

Site works on php 8.1! Just not php 8.0, for some reason that I don’t need to know.

Without rah_nocache, Firefox creates a pop-up on every admin webpage load requesting a force reload. Opera doesn’t have this issue.

Thank you, everyone! I am going to consider my site fully updated at this point.

Offline

#41 2024-04-12 07:25:20

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,220
Website

Re: Big upgrade jump

skewray wrote #337085:

Site works on php 8.1! Just not php 8.0, for some reason that I don’t need to know.

Without rah_nocache, Firefox creates a pop-up on every admin webpage load requesting a force reload. Opera doesn’t have this issue.

Thank you, everyone! I am going to consider my site fully updated at this point.

Congratulations!

Do you have any adblocker or similar active in Firefox – in addition to the already mentioned noscript extension. I think you need to completely whitelist your site, as there is lots of js at work on the admin pages. And again, the browser console might give a hint about potential issues or conflicts.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#42 2024-04-12 07:38:20

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 200
Website

Re: Big upgrade jump

My Firefox has NoScript and an Ghostery. I test it in a no-cache version of Opera, and if it works there, I am okay with it. And it does! For now, I can happily leave rah_nocache enabled to make Firefox happy.

Offline

Board footer

Powered by FluxBB