Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent line breaks #2

Closed
NicolasGraph opened this issue Apr 21, 2016 · 13 comments
Closed

Persistent line breaks #2

NicolasGraph opened this issue Apr 21, 2016 · 13 comments

Comments

@NicolasGraph
Copy link
Contributor

NicolasGraph commented Apr 21, 2016

Hi Patrick,
I have unexpected line breaks in the output. It seems to come from

  1. cache files output (from oui_instagram), which are not compressed; elsewhere;
  2. multilines comments like so:

.

<!-- thumbnail form
     ——————————————————————————————————————————————————————————————————————————— -->

Everything seems to be fine with aks_header.

@cara-tm
Copy link
Owner

cara-tm commented May 10, 2016

I can correct multilines comments but can't see where your caching files come from.
Need to do some tests ;)

@NicolasGraph
Copy link
Contributor Author

It comes from the temporary directory (usually /textpattern/tmp).

@cara-tm
Copy link
Owner

cara-tm commented May 11, 2016

1°. I just testing your multiline comment example into a page template without any troubles (this comment is removed and replaced with a space as expected).
2°. /textpattern/tmp is the default temporary directory for Textpattern CMS. Nobody did not report such an annoying behavior with pat_speeder before.

@NicolasGraph
Copy link
Contributor Author

NicolasGraph commented May 11, 2016

Ok, on sera probablement plus efficaces en français, qu'en penses-tu ?
Pour commencer je suis en local sur Mamp; quelle version devrais-je utiliser avec Txp 4.6 ? Textpattern.org dit que la version courante est 0.5.0, ton site sert la version 0.7 et 3 autres versions 0.7.1, 0.7.2 et 0.7.3 sont disponibles sur ton GitHub. Les versions 0.7, 0.7.1 et 0.7.2 fonctionnent avec les soucis énoncés ci-dessus mais la version 0.7.3 ne semble pas fonctionner du tout. Si tu as une version corrigeant le problème des commentaires, la tester me permettrait d'y voir plus clair et de mieux localiser où le fichier en cache pose problème.

@NicolasGraph
Copy link
Contributor Author

Je viens de voir que les retours à la ligne indésirables ne concernent pas seulement ce fameux fichier en cache. Rien d'évident pourtant… je pense rester avec aks_header mais si je finis par y comprendre quelque-chose, je ferai signe.

@NicolasGraph NicolasGraph changed the title multilines comments and cache files break inline output Persistent line breaks May 11, 2016
@NicolasGraph
Copy link
Contributor Author

NicolasGraph commented May 11, 2016

Ça y est, je tiens le bon bout: la version 0.7.3 (GitHub) fonctionne très bien une fois activée. Le pb c'est que pour l'activée je dois remplacer 'enable' => NULL par 'enable' => 1. Sans ça, aucun résultat, même avec l'attribut enable = "1".

@cara-tm
Copy link
Owner

cara-tm commented May 11, 2016

<txp:pat_speeder enable="1" gzip="1" /> works perfectly.
Upcoming new 0.7.4 version will provide these attributes (with radio buttons) into the preferences page.

@NicolasGraph
Copy link
Contributor Author

NicolasGraph commented May 11, 2016

My mistake; you are right, the enable attribute works but it is not set to 1 by default as told in the help file, right?
It will be great to use the prefs, in my mind gzip could also be a radio button and code is a good candidate for the upcoming multiselects prefs.

@cara-tm
Copy link
Owner

cara-tm commented May 11, 2016

Yep. See this new version here (in development): 8ce18e3

@cara-tm
Copy link
Owner

cara-tm commented May 12, 2016

@NicolasGraph
Copy link
Contributor Author

Thanks for your replies Patrick; pat_speeder adopted!

@NicolasGraph
Copy link
Contributor Author

NicolasGraph commented May 12, 2016

In fact the link took me back to 0.7 with the previous persistent line breaks (comments).
0.7.4 works fine but the prefs are in the core Administration prefs.
Here is how Stef Dawson shew to set plugin prefs for 4.5 and 4.6:

if (get_pref('pat_speeder_enable', null) === null) {
    if (defined('PREF_PLUGIN')) {
        // For 4.6+
        set_pref('pat_speeder_enable', '0', 'pat_speeder', PREF_PLUGIN, 'yesnoradio', 10);
    } else {
        // For 4.5
        set_pref('pat_speeder_enable', '0', 'pat_speeder', PREF_ADVANCED, 'yesnoradio', 10);
    }
} 

It is easier than safe_insert and helps to keep core things tidy.

@cara-tm
Copy link
Owner

cara-tm commented May 13, 2016

Thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants