By Josh Lewis on Friday, 24 October 2014
Posted in General Issues
Replies 27
Likes 0
Views 1K
Votes 0
History of the Issue:

This issue has existed since at least ES 1.2 beta, perhaps since the beginning of ES. I reported it way back and chatted with Jensen about it but there was so much stuff going on at the time that it was eventually forgotten. My post in issues disappeared hence why I didn't try bumping it. It took a lot of testing and playing around with things to figure out why the uploader was breaking. Jensen did attempt to address it at the time, but because it was so scenario dependent we got side tracked with other things.

The Problem:

The uploader fails to upload your selected photos when clicking "Add Photos". In addition to this, photos that are already uploaded over flow past the template as seen here (look closely on the right side):



The next time you try to upload photos without leaving the page, the uploader works just fine.

How to Replicate it

Set your screen resolution to 1280 x 1024. Then go to protostar's template.css file and add the following code that makes it a specific size:

.container {
max-width: 1280px !important;
width: 98% !important;
box-sizing: border-box;
}
.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
max-width: 1280px !important;
width: 98% !important;
}


Have an already existing album and try to add photos (if you need to create the album, refresh the page before uploading photos). Do not resize the window, and do not do anything else. After the upload fails, it seems to self correct itself and then allow uploading once the overflow is sized.

Another scenario where the uploader breaks is when you resize the window as the uploader is uploading photos.

The Why

Because we have an overflow issue in certain scenarios (sizing of screen vs template), the uploader literally breaks because the objects that are supposed to move the other photos cannot move. As a result screen resolution literally breaks functionality (this is the first time I've ever seen something like this).

Potential Solutions

- The self correcting mechanism that fixes the image width after it fails the first time could possibly have a method to get the right sizing the first time or run that little script as it loads.

- A way so that images can never overflow as seen in the above screen shot.

I just want to remind the stacked team that I'm highly appreciative of this awesome uploader and that this post is not meant in any way to be a complaint. It's a series of observations and to carefully address an issue.
Hi Josh, sorry for the late follow up.
I have completed the fix for both sidebar thumbnails and load more issue and Arlex will be pushing them to your site shortly for testing.
·
Tuesday, 18 November 2014 11:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Noted. Setting up a testbench for this. Update you again in a while.
·
Friday, 24 October 2014 11:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Josh, I'm sending you a custom version of "albums/item.js" which has 2 things
1. Fixes for upload item disappearing when resizing window.
2. Generates calculation results which you can see from the Console Panel in Firebug or Chrome Developer Tools.

Instructions:
1. Replace the original file "media/com_easysocial/scripts/albums/item.js".
2. Switch to "Development" mode. Tip: You can add &es_env=development on the url.
3. Screen capture the results from the Console Panel and post it here so we can compare.

I'm also submitting my results so we can compare.
·
Friday, 24 October 2014 13:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Jensen for the fix, seems to have fixed the specific size breaking the uploader part. But resizing the window still breaks the uploader.

Regarding the console, while I use FireBug a lot I admit that I'm not very well versed with the console. I tried digging around for the item.js file but could not find it. I had the development parameter added to the url. I kept seeing easysocial-1.3.10.static.min.js over and over when clicking the profile tab of the console.
·
Friday, 24 October 2014 16:45
·
0 Likes
·
0 Votes
·
0 Comments
·
The uploader issue has been fixed and will be rolled into the next update.

As for the overflowing photo issue, I am unable to replicate from your test site.
I would love to help but I think you're gonna need to help me first!

I made a video for you for a step-by-step guide on how to get the console log.
http://www.screencast.com/t/qAw1QmRl

Once you got it, screenshot it and share it over here. :-)
If you make a screencast it will be cool as well. :-)
·
Monday, 27 October 2014 16:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the instructions, it was much easier to use Console in Chrome (at least to find item.js). Typically I use FireFox.

You were not able to replicate the overflow issue because my test site has the fix you provided. Also resizing the window no longer breaks the uploader! Did you change something? Whatever it was I hope that too gets included in the next release too.

Anyways, the results are attached. A big thanks for figuring out the issue.
·
Tuesday, 28 October 2014 16:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Today I updated to ES 1.3.11 which is in so far the most stable release of ES. The uploader doesn't break based on certain conditions nor resizing. However the overflow issue still exists on specific screen sizes. See this issue live here (screen resolution should be 1280 x 1024):
http://www.test.alpineascent.com/photos/item/29-more-photos/user/josh

Overflowing outside of the template isn't nearly as big of a deal as the other issue which is why I feel a lot better about the uploader now. Attached to this message is a screen shot just in case. My stacked profile has the admin/ftp info to the test site. The overflow self corrects as soon as you do something (resize the browser, upload photo, ect).
·
Friday, 31 October 2014 11:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Josh, much apologies for my late reply I have been coding away.
Thank you for making a screenshot for the results. However, there was no anomalies in the calculation so I'll need to look somewhere else for the anomaly!

While I can't replicate I'm thinking what might be going on during the rendering of the tiles.
And I have one question, the overflowing tiles is happening when you load page (and without doing anything yet), right?
·
Tuesday, 04 November 2014 14:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, the issue happens after the page loads as soon as the photos load in. Nothing overflows before the images load. Clicking the "load more" button fixes the issue temporarily. To replicate the issue you will need to do two things:

1. Set the screen resolution to 1280 x 1024.

2. Then go to protostar's template.css file and add the following code that makes it a specific size:

.container {
max-width: 1280px !important;
width: 98% !important;
box-sizing: border-box;
}
.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
max-width: 1280px !important;
width: 98% !important;
}


So no fancy templates are needed to replicate this issue. I appreciate you getting back to me on this.
·
Tuesday, 04 November 2014 14:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your instructions again. We couldn't replicate at first but now, at last, we can! It seems to be an issue of race condition. We're figuring out how to fix this at the moment.
·
Thursday, 06 November 2014 10:50
·
0 Likes
·
0 Votes
·
0 Comments
·
The reason I choose those those pixel sizes is because that is one of the major monitor resolution sizes which happens to not play well when dealing with 1% padding on each side. And of course it just so happens to be an issue that will effect quite a few users. Thanks Jensen for looking into this.
·
Thursday, 06 November 2014 11:03
·
0 Likes
·
0 Votes
·
0 Comments
·
hello Josh Lewis,

Sorry for late reply to this,
We have applied some fix in your test site, can you give it a try and see is it working now? Please advise.
·
Friday, 07 November 2014 15:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex for the fix. It's nearly perfect. Not a big deal, but for a split second a small block appears (as the page loads) on the right side as seen in this screen shot:



When the block goes away, the gallery moves over to the left a little. Again, we are looking pretty good. Just striving for perfection. I've tested this over and over just to make sure it's consistent (as in happens each time I look at the gallery).
·
Friday, 07 November 2014 16:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Josh,

You're welcome, but this one we can't reproduce in our end.

Check my video link : http://screen.stackideas.com/2014-11-07_1642.swf
·
Friday, 07 November 2014 16:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Your right about the box not displaying on your end. I'll investigate that part. But in your video the images did slightly move over a little (which is the second minor issue I mentioned). Your video actually helped me see what might be part of the issue. Pause the video at the 5 second mark (later end of the second). You will notice that the third image (in the first row) does not have padding on the right side which is different from all the other images. Once the padding from the third images load in, the responsiveness of the gallery kicks in and slightly shrinks all the photos (very subtle detail). Thanks for making the video, this is a great idea if the timing for something is very precise like it is here.

Basically we need to figure out why the padding on the third image (possibly forth) is not loading at first.
·
Friday, 07 November 2014 17:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Well the gray block looked like the "Load More" button, however I couldn't replicate it either.
Anyway I would like to share with you some technical details.

Previously, EasySocial hides all the image tiles until calculation is performed. When EasySocial hides all the image tiles, the page height was short so the browser did not render a scrollbar. Without the scrollbar, viewport width was wider and EasySocial was calculating based on that wider viewport width, causing the image tiles to overflow once it was finally rendered on the screen.

So the first change I did was the initial rendering strategy. Unlike before where image tiles are hidden first, the image tiles are now immediately displayed on the screen before calculation kicks in. Not only did this reduces code complexity, it allows user to see the thumbnail much quickly and ultimately fixes the overflowing issue.

However, the drawback to this is what you have mentioned - where you noticed tiles were subtly shrunked by 1 or 2 pixels after actual calculation was done, which is the second chnage that I did.

The second change I did was adjusting the viewport width to the nearest number that is divisible by 4. This is so that tiles will have a width & height that is a perfect whole number without decimal points, e.g. if the viewport width was 962px, the viewport is adjusted to 960px so when divided by 4, each tile would have a clean 240px instead of 240.5px, which helps browsers to accurately render them without quirks.

And that is why there is this subtle 1-2px adjustment.

While I wish I could come up with a better solution where adjustments wouldn't be necessary, browsers are the ones handling floating-points and they are inconsistent across browsers.

I may have mentioned this before where we are considering getting rid of this layout in the future (1.4? 1.5? I don't know) in favour of a more "pinterest-style" layout because it would help us skip all these unnecessary calculations altogether and just let CSS purely do all the work. This would scale better on albums with high number of images.

In the meantime, I am frantically working on EasyBlog 5 and once that is done I will return to the EasySocial team and continue with all the image-related requests that you guys have been asking for.
·
Friday, 07 November 2014 17:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Jensen for the very thoughtful reply! It's fine for now. Responsive CSS seems like the way to go further down the road. The past few months I've done some work with creating responsive objects/layout via CSS. (my point being that I've seen it work very well) I'm also really pleased to hear a little bit of news about EB5.

Regarding the little grey box, I discovered that I cannot replicate it on Chrome but do replicate it every time on FireFox 33.0.3. I typically use FireFox for both browsing and testing. So in other words it's a browser dependent issue.
·
Friday, 07 November 2014 18:06
·
0 Likes
·
0 Votes
·
0 Comments
·
I should also note that it appears that the new mod broke the image thumbnails on the left side as seen here:
http://www.test.alpineascent.com/photos/photos/item/100-p1210105/user/josh

My main site does not have this issue (same version of ES which is ES 1.3.12). The reason for this is that for some reason the following selector is not being assigned to the mini thumbnails on the test site (selector below is from the working site):

.DS055879394169898 [data-photo-list-item-image] {
height: 34px !important;
width: 34px !important;
}


The first class I'm sure is generated on a per photo bases?
·
Friday, 07 November 2014 19:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, it appears this error is related to the mod we applied on your test site.
In fact, you're the first one to test out the mod before we put it on the next EasySocial update, so thanks for testing it out before it's too late!
And hang on, I will get back to you on the fix.
·
Monday, 10 November 2014 19:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Jensen. I'm curious if we can fix the little grey box issue in FireFox? (upon load as mentioned above) If it's a lot of work, don't worry about it. The padding/slight space as you mentioned is a lot of work.
·
Monday, 10 November 2014 19:57
·
0 Likes
·
0 Votes
·
0 Comments
·
I know you guys are busy lately, just giving a friendly reminder to get this in time before the next maintenance release.
·
Thursday, 13 November 2014 15:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for reminding! No worries I will follow up!
·
Friday, 14 November 2014 18:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Josh Lewis,

After I applied Jensen's fix in your site, everything seems working fine now. Can you give it try again?
·
Tuesday, 18 November 2014 12:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Awesome! Thanks guys for investigating and getting this resolved. I assume this will make it into the next release of ES. Once that happens and assuming all works out fine, I'll mark this topic as resolved. Until then keep this thread open. As always, we really appreciate the work you folks do. I can't think of any other company I like better than StackIdeas! (yes, I am now officially saying that you guys made my #1 list)
·
Tuesday, 18 November 2014 13:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Josh Lewis,

Thanks for your compliment
·
Thursday, 27 November 2014 13:24
·
0 Likes
·
0 Votes
·
0 Comments
·
I can now safely say that this issue is resolved as of ES 1.3.13. You guys once again did great. Keep this thread open just in case something comes up. It's unlikely it will be creating problems any time soon.
·
Thursday, 27 November 2014 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Josh Lewis,

No problem.
·
Thursday, 27 November 2014 17:22
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post