Image zoom is not working


(Pirat) #1

It does not always work to increase the modal window
I do not know how to replicate the bug but it is
I tested on all browsers

I have lost features such as zoom in images


Discourse-Translator++
(Pirat) #2

Just I figured out the reason

this plugin breaks pictures and video

it needs to be fixed!


(James Kiesel) #3

Hi, I’d just like to point out that a human (namely @tgxworld) wrote that plugin without being paid for it, and provided it to you free of charge because he’s a nice guy who wants Discourse to be cooler. (He works for Discourse now, but I don’t think he did when this code was written, and either way this is not an officially supported plugin.)

So, while it’s great to report this issue, no one actually owes you a fix, and demanding one in big bold letters does not help matters. I’m sure @tgxworld or someone will be happy to fix it as their time allows.


(James Mc Mahon) #4

Yeah I think there is some confusion here. The plugin you have diagnosed as root cause is not an official Discourse plugin, therefore you are best reaching out to that plugin author.

Might I also suggest that in doing so, you reconsider your approach. Honey works better than vinegar.


(Jeff Atwood) #5

Translator is official though so this should be fixed @tgxworld


(James Mc Mahon) #6

I sit corrected. Carry-on


(Alan Tan) #7

Did you remove/disable the plugin in order for the issue to resolve? Anything in /logs?

I have the plugin enabled on my dev instance and I’m not getting an error.

I can’t replicate the bug as well so unless you can provide exact reproduction steps for the error you’re seeing, it is going to be hard for me to figure out where the bug is.


(Pirat) #10

Refresh the page after translation

I updated the plugin
Error remained

If you do not have an error, try to connect this plug-in yet

Perhaps the error occurs because of two plug-ins, at the moment I have only two of their


(Alan Tan) #11

Ok the bug isn’t with discourse-translator but the plugin happens to trigger the bug.

To replica, run the following commands. Somehow saving a post with an img wrapped in lightbox will remove the lightbox even though the Post#raw hasn’t been changed.

[2] pry(main)> post = Post.last

[3] pry(main)> post.cooked
=> "<p><div class=\"lightbox-wrapper\"><a data-download-href=\"//localhost:3000/uploads/default/34784374092783e2fef84b8bc96d9b54c11ceea0\" href=\"//localhost:3000/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" class=\"lightbox\" title=\"Sword reworks.gif\"><img src=\"//localhost:3000/uploads/default/optimized/1X/34784374092783e2fef84b8bc96d9b54c11ceea0_1_690x276.gif\" width=\"690\" height=\"276\"><div class=\"meta\">\n<span class=\"filename\">Sword reworks.gif</span><span class=\"informations\">1000x400 1000 KB</span><span class=\"expand\"></span>\n</div></a></div></p>\n\n<p>This is a test post</p>"

[4] pry(main)> post.save!
   (0.2ms)  BEGIN
  User Load (0.3ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  [["id", 1]]
  Topic Load (0.5ms)  SELECT  "topics".* FROM "topics" WHERE ("topics"."deleted_at" IS NULL) AND "topics"."id" = 11 LIMIT 1  [["id", 11]]
  User Load (0.3ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  [["id", 1]]
  SQL (0.3ms)  UPDATE "posts" SET "cooked" = '<p><img src="/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif" width="690" height="276"></p>

<p>This is a test post</p>', "baked_at" = '2016-10-23 16:51:22.486791', "updated_at" = '2016-10-23 16:51:22.487000' WHERE "posts"."id" = 28  [["cooked", "<p><img src=\"/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" width=\"690\" height=\"276\"></p>\n\n<p>This is a test post</p>"], ["baked_at", Sun, 23 Oct 2016 16:51:22 UTC +00:00], ["updated_at", Sun, 23 Oct 2016 16:51:22 UTC +00:00], ["id", 28]]
   (0.1ms)  SAVEPOINT active_record_1
  UserAction Load (0.3ms)  SELECT  "user_actions".* FROM "user_actions" WHERE "user_actions"."action_type" = 5 AND "user_actions"."user_id" = 1 AND "user_actions"."acting_user_id" = 1 AND "user_actions"."target_post_id" = 28 AND "user_actions"."target_topic_id" = 11 LIMIT 1  [["action_type", 5], ["user_id", 1], ["acting_user_id", 1], ["target_post_id", 28], ["target_topic_id", 11]]
   (0.1ms)  RELEASE SAVEPOINT active_record_1
  Category Load (0.3ms)  SELECT  "categories".* FROM "categories" WHERE "categories"."id" = 1 LIMIT 1  [["id", 1]]
   (2.5ms)  COMMIT
=> true

[5] pry(main)> post.cooked
=> "<p><img src=\"/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif\" width=\"690\" height=\"276\"></p>\n\n<p>This is a test post</p>"

(Pirat) #12

I do not quite understand this means I need to do something, or what?


(Mittineague) #13

Is the data-download-href a URI but not a URL ?

localhost:3000/uploads/default/34784374092783e2fef84b8bc96d9b54c11ceea0

vs.

localhost:3000/uploads/default/original/1X/34784374092783e2fef84b8bc96d9b54c11ceea0.gif

(Alan Tan) #14

PR in


(Alan Tan) #15