amitmodak89 / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

File uploader VS image fields #443

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There's a bug with our Attachments extension used with w2p template products 
containing image fields:

Navigate to
http://ec2-174-129-95-130.compute-1.amazonaws.com/mageimage/index.php/magentot-0
2/1pg-template.html
- Expand the image field. The File uploading field stays where it is, as if it 
were positioned absolutely (field_jump.png). 
The content and box moves downwards, but the field it self stays glued to its 
original spot.

Original issue reported on code.google.com by agur...@gmail.com on 3 Feb 2011 at 1:28

Attachments:

GoogleCodeExporter commented 8 years ago
Looks like a missing CSS 'clear' rule in w2p image fields

Original comment by Anatoly....@gmail.com on 3 Feb 2011 at 3:52

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 3 Feb 2011 at 10:58

GoogleCodeExporter commented 8 years ago
I can not reproduce it on my local M. installation in FF, Chrome, IE7 & IE8

Original comment by Anatoly....@gmail.com on 1 Mar 2011 at 6:15

GoogleCodeExporter commented 8 years ago
Both extension were installed from SVN

Original comment by Anatoly....@gmail.com on 1 Mar 2011 at 6:16

GoogleCodeExporter commented 8 years ago
Atanas, could you please re-test it on mageimage?

Original comment by Anatoly....@gmail.com on 3 Mar 2011 at 6:59

GoogleCodeExporter commented 8 years ago
Tested again on
http://ec2-174-129-95-130.compute-1.amazonaws.com/mageimage/index.php/magentot-0
1/2pg-template.html
web_to_print_store_incl_theme   1.8.4.0alpha30 (alpha)
ZetaPrints_Attachments  1.0.1a (alpha) 

Happens in all browsers, IE corrects it and moves the field down after a few 
seconds, but, initially IE also shows the bug.

Original comment by agur...@gmail.com on 3 Mar 2011 at 1:59

GoogleCodeExporter commented 8 years ago
Ok, found the problem. Fake upload control is positioned statically. That's why 
it pops-up.

Original comment by Anatoly....@gmail.com on 4 Mar 2011 at 8:51

GoogleCodeExporter commented 8 years ago

Original comment by Anatoly....@gmail.com on 4 Mar 2011 at 9:32

GoogleCodeExporter commented 8 years ago
Really? Where is Fake Upload here? 
http://ec2-174-129-95-130.compute-1.amazonaws.com/mageimage/index.php/magentot-0
1/7-page-template.html

Original comment by jamb...@gmail.com on 4 Mar 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Look @9 if you have missed it

Original comment by jamb...@gmail.com on 4 Mar 2011 at 9:41

GoogleCodeExporter commented 8 years ago
Actually previous comments were about another issue.
Unfortunately file uploader has to be absolutely positioned.

Original comment by jamb...@gmail.com on 4 Mar 2011 at 9:45

GoogleCodeExporter commented 8 years ago
So what do we do about it once the fighting is over?

Original comment by zetapri...@gmail.com on 7 Mar 2011 at 9:22

GoogleCodeExporter commented 8 years ago
not much, may be ping uploader position every 10 or 100 mili seconds

Original comment by jamb...@gmail.com on 8 Mar 2011 at 12:00

GoogleCodeExporter commented 8 years ago
Is there any way we can position it differently?

Original comment by zetapri...@gmail.com on 8 Mar 2011 at 5:39

GoogleCodeExporter commented 8 years ago
Not at this stage of development. The file uploader is actually a separate form 
but has to appear as if it is part of general product form.
Since location where options will be rendered on product page depends on too 
many things we cannot do anything else but use javascript to determine correct 
position.

Original comment by jamb...@gmail.com on 8 Mar 2011 at 5:48

GoogleCodeExporter commented 8 years ago
I could try for relative positioning, but this will take some time to redo and 
then to test.

Original comment by jamb...@gmail.com on 8 Mar 2011 at 5:54

GoogleCodeExporter commented 8 years ago

Original comment by Anatoly....@gmail.com on 9 Mar 2011 at 8:25

GoogleCodeExporter commented 8 years ago
on to it

Original comment by jamb...@gmail.com on 9 Mar 2011 at 9:25

GoogleCodeExporter commented 8 years ago
It seems that relative positioning is not that cross browser friendly as I 
hoped.
I went for another option, checking for changes of the page every 100 ms, and 
if such are found, update our elements.
Applied the change to mageimage, would you test if it look OK to you.

Original comment by jamb...@gmail.com on 9 Mar 2011 at 11:18

GoogleCodeExporter commented 8 years ago
Revision r1432

Original comment by jamb...@gmail.com on 9 Mar 2011 at 11:33

GoogleCodeExporter commented 8 years ago
Proper diff setting: 
http://code.google.com/p/magento-w2p/source/diff?spec=svn1432&old=1396&r=1432&fo
rmat=side&path=%2Fbranches%2FZetaPrints_Attachments%2FZetaPrints_Attachments%2Ff
rontend%2Fdefault%2Fdefault%2Fjs%2Fattachments.js
http://code.google.com/p/magento-w2p/source/diff?spec=svn1432&r=1432&format=side
&path=/branches/ZetaPrints_Attachments/ZetaPrints_Attachments/ZetaPrints/Attachm
ents/Helper/Upload.php

Original comment by jamb...@gmail.com on 9 Mar 2011 at 11:35

GoogleCodeExporter commented 8 years ago
I completely dislike the way it's done. Looks like an effect of bad initial 
design.
My 2 cents.

Original comment by Anatoly....@gmail.com on 9 Mar 2011 at 4:04

GoogleCodeExporter commented 8 years ago
Hey I completely dislike the entire idea, but this is what we are requested.
This is open source thing so propose alternative. Feel free to rework the 
frontend.

Original comment by jamb...@gmail.com on 9 Mar 2011 at 4:59

GoogleCodeExporter commented 8 years ago
We need  to use a form outside magento product form. How to replace default 
file upload option with this one and make it appear on the same spot?

Original comment by jamb...@gmail.com on 9 Mar 2011 at 5:25

GoogleCodeExporter commented 8 years ago
Dingggg! End of 2nd round round. The fighter in the red corner leads.

Now let's take a break and have a talk about it offline.

Original comment by zetapri...@gmail.com on 9 Mar 2011 at 7:50

GoogleCodeExporter commented 8 years ago
Possible solution:
  1. Place fake controls in product option's divs. Fake control will be in normal doecuemnt flow.
  2. Place real file input on top of fake control and make it invisible.
     Real file input will be positioned absolutely. Update its position on hover event of fake controls (such technique is used in http://valums.com/ajax-upload/)

Original comment by Anatoly....@gmail.com on 10 Mar 2011 at 10:16

GoogleCodeExporter commented 8 years ago
Basically do the opposite of what is now?
Sounds interesting. Will save me a LOT of JS code.
Will try it when I get other stuff out of the way.

Original comment by jamb...@gmail.com on 10 Mar 2011 at 10:23

GoogleCodeExporter commented 8 years ago
Also we can re-use http://valums.com/ajax-upload/ in the ext (also need update 
it it new version in w2p for user images).

Latest version supports XHR, drag'n'drop, progress bar and multiple file.

Original comment by Anatoly....@gmail.com on 10 Mar 2011 at 10:31

GoogleCodeExporter commented 8 years ago
Yeah I looked at it initially, but it had some features that didn't play well 
with Magento code. Magento code does not understand XHR uploads, and I couldn't 
see an option in the ajax-upload that can prevent using XHR if the browser 
supports it.

Of course nothing is preventing us from modifying the js code or magento code 
but that is some more time spent into this.

Original comment by jamb...@gmail.com on 10 Mar 2011 at 10:51

GoogleCodeExporter commented 8 years ago
http://blog.new-bamboo.co.uk/2010/7/30/html5-powered-ajax-file-uploads - here 
is some suggestion how to use XHR uploading in PHP.

Original comment by Anatoly....@gmail.com on 10 Mar 2011 at 11:16

GoogleCodeExporter commented 8 years ago
Thanks for the link, I have general idea how to go about it. What I meant is 
that presently I do not handle the uploads but leave Magento do that for me.
So handling XHR is an option, but then I have to rewrite entire handling scheme.
I actually would love to do it, if Max allows the time for it.

Original comment by jamb...@gmail.com on 10 Mar 2011 at 11:47

GoogleCodeExporter commented 8 years ago

Original comment by jamb...@gmail.com on 6 Jun 2011 at 7:34

GoogleCodeExporter commented 8 years ago
I believe that this particular problem has been solved. Even if a js rewrite is 
needed it is not part of this issue. We should close the issue.

Original comment by jamb...@gmail.com on 6 Jun 2011 at 7:35

GoogleCodeExporter commented 8 years ago
Tested on /mageimage/
Magento ver. 1.5.0.1
web_to_print_store_incl_theme   1.9.1.0beta2 (beta) 
ZetaPrints_Attachments  1.1.0b (beta) 

http://d1.zetaprints.com/mageimage/index.php/mageimg-01/1pg-template.html

Bug remains in Chrome and Safari. Other browsers correct it and reposition the 
field in a few milliseconds.

Original comment by agur...@gmail.com on 8 Jun 2011 at 7:54

GoogleCodeExporter commented 8 years ago
Atanas, we seem to be unable or unwilling to fix this.
Let's log it as a new issue and document that file uploader doesn't work with 
w2p on the same page, which makes absolutely no freaking sense.
Why the heck did we write it in the first place?

Original comment by ad...@zetaprints.com on 16 Jun 2011 at 9:50

GoogleCodeExporter commented 8 years ago
Atanas, where are we at with this one?

Original comment by ad...@zetaprints.com on 13 Jul 2011 at 3:28

GoogleCodeExporter commented 8 years ago
Just tested it again. Bug remains and I don't think it's going away on its own 
:)
http://d1.zetaprints.com/mageimage/index.php/mageimg-01/1pg-template.html

Chrome and Safari still have it. Other browsers also show it but it gets 
corrected right away.

Original comment by agur...@gmail.com on 13 Jul 2011 at 9:16

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 17 Feb 2012 at 2:34