Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2024-05-12 15:09:39

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

Re: pat_speeder

Julian,
Thanks so much for the txt file, but the plugin is still not working for me. Using PHP version: 8.2.15.


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

Offline

#98 2024-05-12 15:35:32

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

Re: pat_speeder

Hmm. Do you mean the plugin in general, or its installation? Do you see any kind of error? If not from Textpattern, then in the console pane of the browser dev tools (Command+Alt+I for most Mac browsers)?

I just created a new fresh local installation of the current state of txp 4.9 and php 8.2.19 and tried installing from the txt file Patrick has put online. Everything worked successfully, so I’m a little stumped.

It’s quite possible our txp4.9 versions have differences as 4.9 has been ‘around’ for a long while. Another idea: are the read/write permissions for /textpattern/plugin folder sufficiently permissive? If not, maybe try making it 777 and then scale back gradually. Perhaps txp is stumbling over not being able to write to the plugin directory?


TXP Builders – finely-crafted code, design and txp

Offline

#99 2024-05-12 16:14:35

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

Re: pat_speeder

The plugin installed successfully but it does not minimise the html.

I just put the site on the Debug mode and this is what it returned.

General error Textpattern Warning: Unknown callback function: pat_process($buffer, $gzip, $code, $compact) on line 1682

textpattern/lib/txplib_misc.php:1682 trigger_error()
textpattern/publish.php:240 callback_event()
index.php:76 include()

Edited to add that I’m using the latest txp dev version.

Last edited by colak (2024-05-12 16:34:48)


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

Offline

#100 2024-05-12 19:01:38

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

Re: pat_speeder

Ah right, so not an installation problem. I see what you mean now. However, it does seem to compress the output despite the error, and also when I comment out the line that it refers to completely. In Firefox/Brave you can see it by showing source. In Safari devtools the source is prettified by default so you only see the concatenation when you click on the curly-bracket symbol (on mine it shows a tooltip “Original formatting”).

Maybe it’s the way the pat_process is referenced in the callback with the four attributes. Referencing the function without the attributes says there are too few provided. Perhaps the function could specify relevant defaults for the attributes and then it could be referenced just by function name in the callback? But Patrick’s more qualified to answer here…


TXP Builders – finely-crafted code, design and txp

Offline

#101 2024-05-12 19:01:49

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,629
GitHub Twitter

Re: pat_speeder

Ok.
Ok. The part of code in cause is this:

if (txpinterface == 'public') {
	register_callback('pat_process($buffer, $gzip, $code, $compact)', 'pretext');
	if (get_pref('pat_speeder_pref_debug') == 1) {
		register_callback('pat_compression_end', 'textpattern_end');
	}
}

Remove these lines. I’ll publish a new version (corrected) tomorow.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#102 2024-05-13 02:07:25

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

Re: pat_speeder

Pat64 wrote #337174:

Ok.
Ok. The part of code in cause is this:

if (txpinterface == 'public') {...

Remove these lines. I’ll publish a new version (corrected) tomorow.

The error disappeared after I removed those lines but the code is still not minimised.


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

Offline

#103 2024-05-13 02:11:58

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,629
GitHub Twitter

Re: pat_speeder

Did you add a <txp:pat_speeder /> tag into the first line of your pages?
You have a list of options into the preferences panel: check “Activate pat_speeder ?”

I tested the plugin yesterday with the official demo 4.9-dev website: all works perfectly (without any errors, now).

Last edited by Pat64 (2024-05-13 02:12:24)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#104 2024-05-13 03:13:58

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

Re: pat_speeder

Pat64 wrote #337176:

Did you add a <txp:pat_speeder /> tag into the first line of your pages?
You have a list of options into the preferences panel: check “Activate pat_speeder ?”

Yes! github.com/colak/neme/blob/master/pages/default.tpl#L2.

I tested the plugin yesterday with the official demo 4.9-dev website: all works perfectly (without any errors, now).

It’s very strange as I’ve been using the plugin since the beginning and this is the first time that it does not function.


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

Offline

#105 2024-05-13 03:15:40

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,629
GitHub Twitter

Re: pat_speeder

Sure!

I’m using this new version within 4 websites without any problems. Can’t understand…


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#106 2024-05-13 03:28:43

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

Re: pat_speeder

Pat64 wrote #337178:

Sure!

I’m using this new version within 4 websites without any problems. Can’t understand…

I could give you access to the site if that would 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

#107 2024-05-13 04:10:00

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,629
GitHub Twitter

Re: pat_speeder

Yep. That could be interesting.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#108 2024-05-13 04:31:16

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

Re: pat_speeder

@colak

Under Admin > Preferences > pat speeder: Is the “Enable pat_speeder?” entry set to “Yes”?

(without that, the extension does nothing on my side)

–^–^–

@Patrick

Is it possible to have a more fine-grained list of tags ignored or left un-minified by pat_speeder?

For example, I would like to have JSON blocks minified (<script type="application/ld+json">) but not the few standard JS blocks left untouched.


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

Offline

Board footer

Powered by FluxBB