Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-01 10:47:37

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

Hi,

I just upgraded a site from 4.0.3 to 4.0.4 and I’m having a problem with upm_image and upm_image_popper. What I did was to first uninstall the old combined upm_img_popper v0.10. I then installed the latest versions of the separated upm plug-ins and as the final step upgraded txp itself.

The first time I logged into the admin section I was greeted with these error messages
Since that didn’t tell me much, I went on and discovered the following issues:

  • upm_image_popper won’t no longer insert images except for adding them as article images. Selecting image, thumb, popup, custom etc. does nothing.
  • all previously inserted images using a custom upm_image form
<txp:upm_image image_id="<txp:upm_img_id />" />
<p class="caption"><txp:upm_img_caption /></p>

are not rendered any longer, but instead display stray characters and the images’ captions only like so:

“ />
This is an image caption

I tried uninstalling and reinstalling the upm_image plug-ins, but to no avail – I’m at a total loss.

Can anyone help me?

Cheers Martin

Last edited by masa (2006-12-04 15:11:00)

Offline

#2 2006-12-01 11:51:57

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

If these tags appear inside an article, this is probably caused by Textile 2.0. Prefix your code with notextile. and look if it helps.

notextile. <txp:upm_image image_id="<txp:upm_img_id />" />
<p class="caption"><txp:upm_img_caption /></p>

Offline

#3 2006-12-01 12:21:33

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

No, sadly it doesn’t make any difference. These tags are what’s contained in my custom image form, but I tried it anyway.

Regarding the problems with upm_image_popper, since my first post I’ve installed both plug-ins under a fresh txp 4.0.4 install and it doesn’t work there either. When clicking any of the above mentioned options Firefox’s js console shows the following:

Error: myField has no properties
Source File: http://domain.com/textpattern/index.php?event=upm_img_popper_js&name=link
Line: 72

Any more ideas?

Cheers Martin

Last edited by masa (2006-12-01 12:22:12)

Offline

#4 2006-12-01 13:06:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,350
Website GitHub Mastodon Twitter

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

masa wrote:

I just upgraded a site from 4.0.3 to 4.0.4 and I’m having a problem with upm_image and upm_image_popper. What I did was to first uninstall the old combined upm_img_popper v0.10. I then installed the latest versions of the separated upm plug-ins and as the final step upgraded txp itself.

Not that I think that it will make any difference but why don’t you try to uninstall the plugins by deleting them, use php my admin and check any errors you might have in the db and then reinstall the plugins


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2006-12-02 02:59:26

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

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

  • It’s a good idea to always upgrade Txp first, then upgrade your plugins.
  • upm_image wouldn’t cause the problem – it’s not an admin-side plugin.
  • The db errors you received are caused by Txp’s upgrade mechanism; they can be ignored.
  • Are you running Firefox 2 on a Mac, by any chance?

Offline

#6 2006-12-02 08:40:03

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

Mary wrote:

  • It’s a good idea to always upgrade Txp first, then upgrade your plugins.

OK will keep that in mind for the future. But wouldn’t deleting and reinstalling a plug-in have the same effect?

  • upm_image wouldn’t cause the problem – it’s not an admin-side plugin.
  • The db errors you received are caused by Txp’s upgrade mechanism; they can be ignored.

That’s good to know. As suggested by colak I also checked the db, but that seems fine apart from the following message that I also get on another, fresh install of txp:

Problems with indexes of table `txp_form`
Warning PRIMARY and INDEX keys should not both be set for column `name`
Problems with indexes of table `txp_lang`
Warning UNIQUE and INDEX keys should not both be set for column `lang`
Problems with indexes of table `txp_page`
Warning PRIMARY and INDEX keys should not both be set for column `name`
Problems with indexes of table `txp_plugin`
Warning UNIQUE and INDEX keys should not both be set for column `name`
Problems with indexes of table `txp_section`
Warning PRIMARY and INDEX keys should not both be set for column `name`

No, I’m on FF 1.5.0.8 (Mac), but that describes my problem exactly.

There seem to be two separate issues here: first upm_image_popper 1.3.1 doesn’t wan’t to insert images in FF, and second my image form fails in the new upm_image.

Is there anything wrong with the form I posted above? Why would it render the stray tags " /> instead of an image but the caption just fine? By the way I was never able to make the attributes class and wraptag work inside <txp:upm_img_caption />.

I was able to temporarily fix the image display by reverting to upm_img_popper v0.10, but of course that leaves the site without a way to conveniently insert images.

I’m very much depending on your wonderful plug-ins and would like to solve these issues as soon as possible.

Thanks for the help!

Cheers Martin

Offline

#7 2006-12-02 10:31:32

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

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

By the way I was never able to make the attributes class and wraptag work inside <txp:upm_img_caption />.

It’s only recently that they accepted them at all.

Is there anything wrong with the form I posted above?

I didn’t look at your form. Now that I have I see what the problem is:

<txp:upm_image image_id="<txp:upm_img_id />" />

You can’t do that in Textpattern, but I also wouldn’t advise it, because that’s looking up the image info twice.

You’ve got two options:

notextile. <txp:upm_image image_id="5" />
<txp:upm_image image_id="5" form="image_caption" />

image_caption:

<p class="caption"><txp:upm_img_caption /></p>

Or:

notextile. <txp:upm_image image_id="5" form="image_caption" />

image_caption:

<p><img src="<txp:upm_img_src />" width="<txp:upm_img_width />" height="<txp:upm_img_height />" alt="<txp:upm_img_alt />" title="" /></p>

<p class="caption"><txp:upm_img_caption /></p>

Offline

#8 2006-12-02 10:50:43

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

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

I found the bug in the image popper. Grab the update.

Offline

#9 2006-12-02 12:12:20

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

Mary wrote:

I found the bug in the image popper. Grab the update.

Mary, you’re brilliant, it’s working again!!
Thank you so much! :-)

As to my custom form…

<txp:upm_image image_id="<txp:upm_img_id />" />

You can’t do that in Textpattern, but I also wouldn’t advise it, because that’s looking up the image info twice.

I see, the funny thing is it does work with the old image popper.

Your second suggestion with the custom form containing…

<p><img src="<txp:upm_img_src />" width="<txp:upm_img_width />" height="<txp:upm_img_height />" alt="<txp:upm_img_alt />" title="" /></p>
<p class="caption"><txp:upm_img_caption /></p>

would be ideal, however it produces an image tag with empty attributes followed by the caption like so:

<p><img src="" width="" height="" alt="" title="" /></p>
<p class="caption">This is some caption text.</p>

Any idea why?

Thanks for all your help!

Cheers Martin

Offline

#10 2006-12-04 14:51:32

masa
Member
From: North Wales, UK
Registered: 2005-11-25
Posts: 1,095

Re: Problems with upm_image & upm_image_popper in v. 4.0.4 – solved!

Mary,

I figured it out by carefully reading through the help: three of the tag names were actually slightly different, e.g. <txp:upm_img_src /> should be <txp:upm_img_full_url />. The following form now works:

<p><img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" title="" /></p>
<p class="caption"><txp:upm_img_caption /></p>

Thanks again for your help and the brilliant plug-ins!

Cheers Martin

Offline

Board footer

Powered by FluxBB