Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-09 10:16:06

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Strange problem tryin' to replace images

Often, but not always, when I try to replace some images (Contents => Images => Modify) I get strnage DB errors.

e.g. the last one is this:

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘aria divertita’, category = ‘porkettaro’, date = now(), author = ‘ca’ at line 7 update txp_image set name = ‘burlino.jpg’, ext = ‘.jpg’, w = 469, h = 681, alt = ‘Il piccolo Porkettaro’, caption = ‘Un Porkettaro in fieri dall’aria divertita’, category = ‘porkettaro’, date = now(), author = ‘candyman’ where id = 9 in /var/www/vhosts/maidireblog.it/httpdocs/textpattern/lib/txplib_db.php on line 84

What may the problem be? Why, with the same method, sometimes works?

Offline

#2 2007-11-09 10:34:06

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Strange problem tryin' to replace images

It’s due to the apostrophe ' you have in the caption. This is already fixed in the development branch of TXP: SVN 2478 and will also be fixed in TXP 4.0.6.

Offline

#3 2007-11-09 10:37:10

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: Strange problem tryin' to replace images

I understand. How can I solve this? How can I modify this without replacing the TXP files?

Thanks in advance.

Offline

#4 2007-11-09 10:50:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Strange problem tryin' to replace images

You can manually modify textpattern/include/txp_image.php as shown in the SVN 2478 changeset I linked to in my previous post. This won’t affect future upgrades (which already include this fix).

Offline

Board footer

Powered by FluxBB