Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Media Dimensions don't work when translation module turned off #286

Closed
simonsmithies opened this Issue · 16 comments

2 participants

@simonsmithies

Arjan has looked at this and determined the problem is related to the translation module. To repro, deactivate the Translation Module.

As originally documented on the Zotonic forum:
My site's users have inserted a very large facebook link image in their test site (see http://coolair.twigsolutions.co.nz:8000/) , and it's displaying at its native size -- basically ignoring the image size commands from the editor.

I'm aware of the media_dimensions setting in site config, and have
tried using that to force a size, but that doesn't seem to have any
effect either.

@arjan arjan closed this issue from a commit
@arjan arjan Replaced TinyMCE with latest version. Fixed zmedia plugin.
Fixes #286

Squashed commit of the following:

commit d5916e7759d46480c9af8639932409ec7eee3976
Author: Arjan Scherpenisse <arjan@scherpenisse.net>
Date:   Sat Jan 28 10:59:25 2012 +0100

    Remove console.log

commit 4be5c7102d1e0edc1b20304d9eefb89111965b9f
Author: Arjan Scherpenisse <arjan@scherpenisse.net>
Date:   Sat Jan 28 10:55:41 2012 +0100

    Replaced TinyMCE with latest version. Fixed zmedia plugin.
17ac5a6
@arjan arjan closed this in 17ac5a6
@simonsmithies

I'm still having problems.

When adding media to a page via the Add/Edit Media dialog (search tab), the link to the new media item doesn't appear on the page until you refresh/exit and return to edit mode.

When clicking on an image in the Add/Edit Media dialog (media on this page tab):
Error evaluating ajax return value: z_dialog_close();window.z_choose_zmedia("381"); z_unmask('fvortb-choose-381');
Followed by:
ReferenceError: res is not defined
The image is not added to the page text.

I've found I can now get images into the page text (tinymce editor) by drag/dropping them from the Add/Edit Media dialog (though no longer from the Attached Media section). Am using this as a workaround for the error above.

Media Dimensions now seem to be getting applied -- all my newly added images seem to be appearing at the "small" size. However I still cannot modify the size applied to each image because selecting an image and clicking the "Image" button still produces the Add/Edit Media dialog, rather than the image properties dialog. (Confirmed in both FF and Chrome on Mac.)

@simonsmithies

Am testing in a brand new clone.

@simonsmithies

The images are being rendered as 80px X 80px jpegs. Two problems with this:

  1. My site.media_dimensions config value is set to "101x101,202x202,401x401". And according to the docs, the default is "100x100,200x200,300x300". Not sure where the 80 is coming from.
  2. The images I'm adding are PNGs.
@arjan
Owner

try refreshing your browser cache, a lot of javascript has changed

@simonsmithies
@simonsmithies

I've set up a clean install of imagemagick and zotonic on a completely different server (a free/micro instance on the Amazon AWS/cloud BTW -- Zotonic seems quite happy there). Problem is exactly the same there.

ImageMagick version is 6.5.4-7 2011-01-17 - standard with the distro.

@simonsmithies

Can we re-open this?

@arjan
Owner
@simonsmithies
@arjan arjan referenced this issue from a commit
@arjan arjan Fixed typo in TinyMCE. See #286 7f286d0
@arjan
Owner

I fixed the ReferenceError: res is not defined, that was a stupid typo, sorry. Adding images in the editor should work now, I confirmed that changing the sizes according to the media dimensions works again.

Note that dragging the image from the dialog into the editor is wrong: that way the dimensions will never be applied.

@simonsmithies

Nice to see the error gone.

However now:

  • If I insert image, save and view, then edit page again, the image is removed (after briefly flashing in the editor). Image remains in the rendered page provided I don't save the editor, so it seems something's going awry when the content is loaded into tinymce.
  • If I do things in the right sequence I can get the dimensions dialog to appear, but regardless of the setting there, the image is always rendered as uploaded - i.e. now not resized at all.

Just noticed - the image also gets removed on update from the editor's HTML dialog.

Have re-tested on my original server which is running ImageMagick 6.7.3-2 2011-10-26 (compared with 6.5.4-7 2011-01-17 on the other server where I'm also seeing the same problem). Symptoms are identical on the two machines, as far as I can tell.

@simonsmithies
@arjan
Owner
@simonsmithies
@simonsmithies
@arjan
Owner
@kaos kaos referenced this issue from a commit in kaos/zotonic
@arjan arjan Again fix the embedding of images in TinyMCE. Fixes #286 747564d
@mawuli mawuli referenced this issue from a commit in mawuli/zotonic
@arjan arjan Replaced TinyMCE with latest version. Fixed zmedia plugin.
Fixes #286

Squashed commit of the following:

commit d5916e7759d46480c9af8639932409ec7eee3976
Author: Arjan Scherpenisse <arjan@scherpenisse.net>
Date:   Sat Jan 28 10:59:25 2012 +0100

    Remove console.log

commit 4be5c7102d1e0edc1b20304d9eefb89111965b9f
Author: Arjan Scherpenisse <arjan@scherpenisse.net>
Date:   Sat Jan 28 10:55:41 2012 +0100

    Replaced TinyMCE with latest version. Fixed zmedia plugin.
b39512f
@mawuli mawuli referenced this issue from a commit in mawuli/zotonic
@arjan arjan Fixed typo in TinyMCE. See #286 53a3c2c
@mawuli mawuli referenced this issue from a commit in mawuli/zotonic
@arjan arjan Again fix the embedding of images in TinyMCE. Fixes #286 cd726d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.