Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#145 2008-02-10 17:48:58

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: glz_custom_fields

Gerhard,

What is the proper way to upgrade? Any particular things that could happen and should be avoided?

Offline

#146 2008-02-10 17:51:51

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: glz_custom_fields

I just upgraded an ultra basic test site and the search result tag isn’t spitting anything out anymore – it was before. Looking into it now…

Last edited by lee (2008-02-10 17:52:14)

Offline

#147 2008-02-10 21:08:16

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: glz_custom_fields

jstubbs wrote:

Gerhard,

What is the proper way to upgrade? Any particular things that could happen and should be avoided?

Hi jstubbs,

Here a quote from Gerhards e-mail to all the plugin contributers:


You can easily replace the previous version, just delete that one and re-upload & activate this one. For safety measures a database back-up before upgrading is recommended.

Offline

#148 2008-02-10 22:59:01

NickCaldwell
Member
From: Brisbane, Queensland in AU
Registered: 2004-03-04
Posts: 40
Website

Re: glz_custom_fields

I tried to install and got the following error message: “Badly formed or empty plugin code.”

Offline

#149 2008-02-10 23:31:35

shi
Member
Registered: 2005-12-09
Posts: 34

Re: glz_custom_fields

This might be a beginner question…

Is there a way of displaying Custom Fields tab under Extensions tab if you are not administrator (publisher)? Managing editor for example…

Now I can only see Custom Fields tab if I log as a Publisher, but I want to enable other registered users to edit custom fields as well…

Offline

#150 2008-02-11 01:21:39

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_custom_fields

Hey everyone,

NickCaldwell wrote:

I tried to install and got the following error message: “Badly formed or empty plugin code.”

That has to do with the upload limit on your PHP install. Find php.ini and set the following: upload_max_filesize = 10M . Let me know if it helps. Also, you might be having issues with the max memory allocated for each script (less common though). Don’t forget that you need to set the upload limit in TXP as well (Admin > Preferences > Advanced). Anyone else experiencing a similar issue?

lee wrote:

I just upgraded an ultra basic test site and the search result tag isn’t spitting anything out anymore – it was before. Looking into it now…

Hmmm, let me know how that goes.

shi wrote:

Is there a way of displaying Custom Fields tab under Extensions tab if you are not administrator (publisher)? Managing editor for example…

OK, that is the new feature that was introduced in TXP 4.0.6 and “broke” the way the plugin was called. In the plugin code, look for add_privs('glz_custom_fields', '1'); and change to add_privs('glz_custom_fields', '1,2');. That will enable both the Publisher AND the Managing Editor to use the plugin. If you go over 2 (meaning under Managing Editor etc.), you might need to modify textpattern/lib/admin_config.php as well (starting around line 185), because the Extensions tab is only available to those 2 users by default.

Any more issues guys, let me know ; ).

Offline

#151 2008-02-11 02:16:36

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: glz_custom_fields

To make sure, don’t add zero (0) to textpattern/lib/admin_config.php if you don’t want public non-priv users to come and edit your posts and plugins :) – well it isn’t problem if you don’t allow public registeration but anyway. But you can edit it, if you have multiple authors that need to be able to use extensions tab. Better way would ofcourse increase the level of those authors instead of editing core files.

Last edited by Gocom (2008-02-11 02:17:33)

Offline

#152 2008-02-11 03:52:08

NickCaldwell
Member
From: Brisbane, Queensland in AU
Registered: 2004-03-04
Posts: 40
Website

Re: glz_custom_fields

My upload_max_filesize is already 32M. I’d be a bit surprised if I was running into memory limits. But maybe that’s it?

Offline

#153 2008-02-11 04:18:41

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_custom_fields

Hmm, that won’t be it then.

Someone else had a similar problem and it was due to the big POST. If mod_security is enabled, Apache will think it’s an attack and will block the request. Try disabling mod_security for the website in question in .htaccess and see if that works. If it works, upload the plugin and then comment the lines.

SecFilterEngine Off
SecFilterScanPOST Off

Offline

#154 2008-02-11 05:10:00

NickCaldwell
Member
From: Brisbane, Queensland in AU
Registered: 2004-03-04
Posts: 40
Website

Re: glz_custom_fields

Adding those lines to my .htaccess broke my site — is that not a complete directive?

Offline

#155 2008-02-11 05:14:47

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_custom_fields

Try the following:



<IfModule mod_security.c>

  # Turn the filtering engine On or Off
  SecFilterEngine Off

  # Should mod_security inspect POST payloads
  SecFilterScanPOST Off

</IfModule>

Offline

#156 2008-02-11 05:27:36

NickCaldwell
Member
From: Brisbane, Queensland in AU
Registered: 2004-03-04
Posts: 40
Website

Re: glz_custom_fields

Just added the code – the site stayed up but still with the “Badly formed or empty plugin code.” error message. Weird.

Thanks for all the assistance though — it’s greatly appreciated.

Offline

Board footer

Powered by FluxBB