DrewDahlman / Mason

Mason.js for creating a perfect grid with jQuery.
http://masonjs.com/
MIT License
1.22k stars 184 forks source link

Uncaught TypeError: Cannot set property '4' of undefined #31

Closed amandagarceau closed 9 years ago

amandagarceau commented 10 years ago

Hi there -

First of all, love the plugin! Thank you.

Although everything still works on the frontend, I am receiving a JS error in my console: "Uncaught TypeError: Cannot set property '4' of undefined"

Seems to be the same as this issue: https://github.com/DrewDahlman/Mason/issues/10

If I use the minified version vs. non minified version I get the same error but instead of property '4', it's property '1'

This error is causing other issues with jQuery plugins, so I'm hoping to get it fixed.

I am using the most recent version of the script here: https://github.com/DrewDahlman/Mason/blob/master/mason.min.js

Thanks in advance!

DrewDahlman commented 10 years ago

Hey there Did you check out the most recent code that I pushed as of this morning?

DrewDahlman commented 10 years ago

also do you maybe have a fiddle with an example of the error happening?

amandagarceau commented 10 years ago

Hi there -

Yes I was using the most recent version from yesterday morning.

I went to create a fiddle, and was not able to replicate my issue. Here it is anyway for reference: http://jsfiddle.net/y1837une/

I was able to find a workaround, but it's not ideal.

Here's how the front-end rendered when I WAS receiving the error: http://postimg.org/image/mbshhhqcv/

Here's how the front-end is rendering now that I'm NOT receiving an error: http://postimg.org/image/u51klgw6f/ notice that I'm actually only using 4 images here (tall, large, large, tall) I'd really like to be using 6 images (small, small, large large, small small) - but it doesn't seem to fall into place as you'd think it should, also results in that error.

Hope this explanation makes sense.

DrewDahlman commented 9 years ago

Please see v2

UnaOmnia commented 9 years ago

Hey Drew,

If there is any way you can personally jump on to check out my project.. like over Skype.. I think that would help me complete it, and I think it would show you a lot about what your trying to do versus applications I have thought of.. What do you say? Meet up quid pro quo style?

DrewDahlman commented 9 years ago

Hey @UnaOmnia send me an email, I can do some consulting if needed I am not totally sure what you are trying to do, and it might not be a right fit for mason but shoot me an email and we can continue this conversation on a different channel.

UnaOmnia commented 9 years ago

Can you send me one first? Or let me know your email?

ted@unaomnia.com <-- I can delete after you message me.

I plan to get a little further along, backup the site, and try to make our conversation light. Just want to go a little quicker on the back and forth, a short Q & A about how this could be integrated into WP loops (and then the WORLD!) ...

UnaOmnia commented 9 years ago

localnationalnews.com/url-test <-- lazy loaded all 375 posts in a category, in order, no duplicates - via AJAX $.post and array to string conversions of all post IDS - I.E. keeping track of boxes, filling boxes, and skipping IDs of posts that fill boxes, etc.

Finally got it working nicer.. now to add more crap like styling etc.

Why I want to talk to you? See any ways I can get load down, get methods more streamlined, also, to see if you can get ideas for your next version, or for a WordPress plugin etc.