First up, LOVE the module.

I'm trying to use the image functions from compass, like say: image-height, but they don't seem to work.

After a little bit of debugging and looking at the callstack I think I've tracked the possible bug down to sassy_compass__resolve_path which looks for the filepath in the context of the current SassScriptFunction, but it seems that the context never gets passed from the SassScriptParser.

Making this simple change gets it working, but I've no idea what ramifications that change might have.

Comments

steven jones’s picture

Status: Active » Needs review
StatusFileSize
new573 bytes

Patch attached.

richthegeek’s picture

Status: Needs review » Patch (to be ported)

Hi, that patch is great - we might be able to do it "better" by using the same style that "image-url" etc use for resolving a file, but either way this bug will be resolved in the next push.

The whole compass stuff needs to be tested more thoroughly really, so if you feel like helping out more then that would be a great place to start!

steven jones’s picture

Status: Patch (to be ported) » Needs work

Oh I'd missed that way of doing it entirely.

richthegeek’s picture

Primary advantage of being the guy who wrote 90% of the code = knowing 90% of the code!

steven jones’s picture

Status: Needs work » Needs review
StatusFileSize
new525 bytes

Okay, copying the usage of sassy_compass__url from sassy_compass__image_url.

richthegeek’s picture

Status: Needs review » Patch (to be ported)

Looks good to me! I'll test it out and roll it in when I get a chance.

Thanks!

steven jones’s picture

Assigned: Unassigned » steven jones
Status: Patch (to be ported) » Needs work

Going to have a look at this one.

steven jones’s picture

Assigned: steven jones » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.14 KB
new14.67 KB

Here's a patch that tests the URL functions a little, the first includes the test fixes from #1532042: Add a base test class and the second is a patch from that point.

Status: Needs review » Needs work

The last submitted patch, sassy-1509822-image-dimensions-just-fix.patch, failed testing.

steven jones’s picture

Status: Needs work » Needs review
StatusFileSize
new6.15 KB
new15.19 KB

Try that again.

Status: Needs review » Needs work

The last submitted patch, sassy-1509822-image-dimensions-just-fix.patch, failed testing.

steven jones’s picture

Status: Needs work » Needs review
StatusFileSize
new11.11 KB
new20.16 KB

Needs to be a binary patch.

Status: Needs review » Needs work

The last submitted patch, sassy-1509822-image-dimensions-just-fix.patch, failed testing.

steven jones’s picture

Status: Needs work » Needs review
StatusFileSize
new11.11 KB

Let's see what the testbot thinks of this.

Status: Needs review » Needs work

The last submitted patch, sassy-1509822-image-dimensions-just-fix_1.patch, failed testing.

steven jones’s picture

Status: Needs work » Needs review
StatusFileSize
new11.24 KB

I think we need to use more of Drupal's functions to build the URLs here.

joseph.olstad’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Steven Jones, just want to say great work on this patch.

Unfortunately while it may have passed testing in 2012 I was unable to get it to pass testing today. I tried merging the code to the current build with similar test results as if reverting to a dev on the same date of the latest patch however there's exception messages on the test runs . Actually I got better results with applying the patch to todays build however it looks like we'd have to figure out what changed or not in phpsass (the library)

I believe that the exception messages are not necessarily an issue with the patch as it was but more about the changes upstream in the phpsass library and possibly in prepro as well (more likely in phpsass) , your patch is maybe referring to a function call that no longer behaves as it did back in august of 2012.

For this reason I am marking this as "postponed". If someone wants to pick up where you left off they may, seems like quite a bit of work to get the patch working again without reverting older problems that I just fixed today. Sad to see your hard work go to waste on this , maybe someone will pick this up later, it'll need a big refactor and a lot of testing.

joseph.olstad’s picture

Status: Closed (won't fix) » Postponed

change it to postponed. if someone is brave and has time to spare, maybe they can continue this issue.

joseph.olstad’s picture

Status: Postponed » Needs review
StatusFileSize
new6.27 KB

@Steven Jones did some great work here.

Rerolled his patch... my bad the previous time I wasn't using git to apply the binary part, this time it should work.

setting this to needs review

Status: Needs review » Needs work

The last submitted patch, 19: sassy-1509822-image-dimensions_19.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new11.24 KB

Status: Needs review » Needs work

The last submitted patch, 21: sassy-1509822-image-dimensions_21.patch, failed testing.

joseph.olstad’s picture

Status: Needs work » Needs review
StatusFileSize
new11.77 KB

  • joseph.olstad committed 0fa7bab on 7.x-2.x
    Issue #1509822 by Steven Jones, joseph.olstad: Image functions don't...
joseph.olstad’s picture

Status: Needs review » Fixed
joseph.olstad’s picture

Thanks @Steven Jones ! great work, I just did a very small amount.

  • Steven Jones authored a23394e on 7.x-2.x
    Issue #1509822 by Steven Jones, joseph.olstad: Image functions don't...
joseph.olstad’s picture

Way to go @Steven Jones,
I amended the commit to give author credit to @Steven Jones

Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.