Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-04 20:53:17

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

r1412 - Fatal error

Just updated a site to 1412, I get the following in the articles, comments and when viewing the site:

Fatal error: Cannot redeclare link() in /var/www/mydomain/textpattern/publish/taghandlers.php on line 308

Where’s my backup ;)

Offline

#2 2006-07-04 20:58:47

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1412 - Fatal error

Are you running any plugins that don’t use proper prefixes?

Offline

#3 2006-07-04 21:03:27

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1412 - Fatal error

This is the only plugin on the site:
mcw_templates Mike West 0.2 File Based Templates

Offline

#4 2006-07-04 21:12:01

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1412 - Fatal error

I looked through it, don’t see the function repeated, so it’s not the plugin. I don’t get the error myself (I always run in debugging).

I don’t suppose it mentions where it thinks the function was already declared? Because I’ve looked through both the stable and development versions, and the function is only declared on line 308.

Offline

#5 2006-07-04 21:24:34

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1412 - Fatal error

I set my site to debugging, same thing.

Diagnostics report:
clean_url_data_failed: – first time I see this?

The report also says:
pretext_data: Fatal error: Cannot redeclare link() in /var/www/mydomain/textpattern/publish/taghandlers.php on line 308

Don’t know where else to look.

Offline

#6 2006-07-04 22:00:05

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1412 - Fatal error

The first bit was a test Alex added in 1302/1304.

Ugh I hate trying to debug stuff I can’t replicate. Rick sent me an email saying the same thing.

The error message should be saying where the function was first declared. Here’s an example:

Fatal error: Cannot redeclare link() (previously declared in taghandlers.php:308) in taghandlers.php on line 323

Note that there are two numbers: one for where each function named “link” is declared.

I can back out the revision, but I’d like to figure out what the problem is.

Offline

#7 2006-07-04 22:08:50

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1412 - Fatal error

Sorry Mary, I don’t see the previously declared info just what I pasted into the first post.

Offline

#8 2006-07-04 22:31:22

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: r1412 - Fatal error

Mary you’ve redeclared the internal PHP function link()

Offline

#9 2006-07-04 22:38:40

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1412 - Fatal error

Good catch graeme, wonder why Mary didn’t get the error?

Offline

#10 2006-07-04 22:51:00

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1412 - Fatal error

OHH. link isn’t implemented on Windows which is what I test on.

Thanks Graeme. Now I just gotta figure out how to handle this for backwards compatibility, what to name it instead. Wish namespaces were used…

Offline

#11 2006-07-05 00:29:44

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1412 - Fatal error

Try r1413.

Offline

#12 2006-07-05 00:39:24

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1412 - Fatal error

All fixed:

Runtime: 0.0185
Query time: 0.003559
Queries: 23
Memory: 1671Kb, end of textpattern()

Thanks Mary.

Offline

Board footer

Powered by FluxBB