Help - Search - Members - Calendar
Full Version: Big Problems With Bigpapi
Movable Type Community Forum > Additional Resources > Plugin Development and Usage
badpoetry
I'm having problems with some plugins that require BigPAPI, and I'm looking for advice and/or confirmation that it's not just me.

The basics:
I started with a clean install of 3.2 (not an upgrade, started with 3.2) running on Mac OS 10.3.9 with Perl version 5.8.1, MySQL version 4.1.14 (just in case any of that matters at all).

Then I uploaded a bunch of plugins (Markdown, TechnoratiTags, StyleCatcher, ifempty, and CustomFields).

Everything got enabled and configured without problems. I set up some custom fields in CustomFields, but when I went to the entry page, they weren't there. No errors of any sort, just no extra textbox where I expected one to be.

I tried posting on the CustomFields developer's forum, he couldn't figure anything out.

I installed UpdateAuthoredOn, which requires BigPAPI, just to check if BigPAPI was working. It worked perfectly.

Then I gave up, since I could find no reason for Custom Fields not working.

Today I installed the similar plugin RightFields in hopes that it would magically work. Sadly, it did not. Same problems as CustomFields -- in the administrative pages for the plugin, I can successfully add and edit fields, but nothing extra shows up on the entry pages.

I've even disabled all my other plugins (except BigPAPI) in hopes that maybe it was a plugin conflict. Still nothing shows up.

Is BigPAPI failing me? Is there any way I can trace this problem to its root? Has anyone else had similar problems?
njesson
I have also added CustomFields to my MT 3.2 installation. I also do not see the fields on the Entry screen.

I tried clicking on the link at the bottom of the page "Customize the display of this page" I clicked on "custom fields" to include the field on the page.

I now have an error message on the bottom of the screen whenever I attempt to edit or create a new entry:

QUOTE
Use of uninitialized value in concatenation (.) or string at /home/mydomain/cgi-bin/mt/plugins/CustomFields/lib/EntriesCMS.pm line 325.


I am also getting an error in the Main menu>>System overview>>Custom Fields page:

QUOTE
Use of uninitialized value in numeric ne (!=) at lib/EntriesCMS.pm line 60.
Use of uninitialized value in numeric ne (!=) at lib/EntriesCMS.pm line 60.


Custom Fields came with a BigPAPI 1.04, which was the same version I had downloaded with another plugin, EnhancedEntryEditing, which has also given me a few error messages although it does not seem to impede its operation.

Any help would be appreciated.

Nick
staggernation
badpoetry, I wonder if your problem is related to file formats. A BigPAPI plugin works by using a regular expression to find part of a template and insert or replace something. If that regular expression contains line breaks, and the .pl plugin file and the .tmpl file don't use the same type of line endings (Mac, Unix, and Windows use different types), that could cause the text not to match. Also if a file wasn't uploaded in ASCII mode.

That's just sort of a blind guess at what might be going on, but if UpdateAuthoredOn is working, that indicates that BigPAPI itself is installed and working properly.

So, maybe try re-uploading the plugins and/or tmpl/cms/edit_entry.tmpl in ASCII mode, or opening them and making sure they're saved with the same type of line endings.

Nick, those are actually warnings, not errors, so they shouldn't be stopping the plugin from working. And, in fact, their presence indicates that BigPAPI itself is working (it's what's causing the CustomFields or EnhancedEntryEditing plugin's code to run and give warnings when the editing is displayed).
badpoetry
Hey, thanks for the reply. I was just about to post about this on your forum when I got the reply notification. (And if you'd like me to move the discussion there, I can do that.)

QUOTE (staggernation @ Dec 12 2005, 08:46 PM)
If that regular expression contains line breaks, and the .pl plugin file and the .tmpl file don't use the same type of line endings (Mac, Unix, and Windows use different types), that could cause the text not to match. Also if a file wasn't uploaded in ASCII mode.


I checked the files in question and it looks like everything's saved with Unix line endings, and I know they were uploading in ASCII mode. That sounded like a good idea, but it doesn't seem to be the problem.

I played around a little more, and I tried changing one of the existing fields to see if that would work. It almost did -- I changed "Extended Entry" to "Video" and changed the field type to "File." When I went back to the entry page, the big textbox for the extended entry was still there, but it was labeled "Video."

Any ideas now?
staggernation
OK, yeah, if it's changing the labels, that's a sign that everything's "working" but the specific regular expressions that replace/insert the customized fields aren't finding what they're supposed to find for some reason. I still suspect something to do with Mac line endings, but it could be something I have to fix in the plugin rather than something you can fix by treating the files differently.

When you mention uploading the files, is the machine you're uploading them from a Mac as well?

I should probably just get MT running on my Mac, something I've been too lazy to do all these years, so I can test this directly. I'll keep you posted...
badpoetry
QUOTE (staggernation @ Dec 12 2005, 09:46 PM)
When you mention uploading the files, is the machine you're uploading them from a Mac as well?
*


Yep. Uploaded with Transmit, if it matters.

Let me know if there's more information that I can provide or anything else that you want me to try.

Thanks for looking into this. I really appreciate it.
danwolfgang
FWIW, Kevin, I've run into similar problems where sometimes the regex doesn't seem to work right. I've fooled with it on and off and can't pinpoint what's happening, so never contacted you about it and have always found ways around it.

I know it can't be possible, but the conclusion I kept coming to was that where in the template the replacement was occurring was important. That is, if a template consists of lines 1, 2, 3, 4 and 5, I could use BigPAPI to replace line 2 or 4 or 5. I could replace line 1 and 2. I could replace lines 3-5. I could replace line 1. But I could not replace line 3, not even part of it. I don't have any examples to share since the solution of replacing lines 2 and 3 was always easy enough.

If I run across any more of these cases I'll fire off an e-mail right away. Maybe you can confirm my sanity, if nothing else!

Dan
stconrad
Thanks to everyone, especially Kevin, for replying to this thread. I was having the exact same problem with RightFields. Our MT is installed on a dev linux server that is mounted on a windows machine using Samba. The CMS templates were all saved as Window's ASCII and it was breaking the plugin. The solution was to run a utility called dos2unix on all the *.cgi, *.pl, *.tmpl files in the MT directory. This probably also fixed some bugs I didn't even know we had. smile.gif

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.