Closed (fixed)
Project:
Views data export
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Jun 2017 at 09:11 UTC
Updated:
25 Mar 2019 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Zemelia commentedPatch attached.
Comment #3
Zemelia commentedComment #4
acbramley commentedWhy not use $this->globalTokenReplace() here?
Comment #5
ben.hamelin+1 for this patch, worked for me.
Comment #6
Zemelia commented@acbramley Hello, we can't use your code in buildResponse method, as it's static, there no $this context in static methods.
Comment #7
hamrant commentedI agree with @Zemelia.
Tested on my current project with this issue, patch from #2 solved problem.
Comment #8
hamrant commentedFound problem. Try to use tokens in files name and you will get this error:
Fixed in new patch version.
Comment #9
fenstratNice one @hamrant, #8 works well.
Would be nice to have a to to verify this.
Comment #10
jhedstromA test here would be really great since it deals with caching, which is always tricky.
A few questions/comments:
Doesn't this object already have
$this->viewset?Is there a reason to not use
$this->globalTokenReplace()instead?Comment #11
borisson_Just spent the last hour or so running into this bug as well, I only had this issue on production, and not on local, but that was because I had
$settings['cache']['bins']['render'] = 'cache.backend.null';in my settings.local.php.I don't have the time to set up a local env that allows me to run tests now, but I think this should be enough to test this:
I have tested the patch in #8 and it does seem to work, so great work on the solution.
Comment #12
borisson_I set up an env for tests, but I can't get them to work as I think they should. This test is green even without the patch applied. If someone else would like to carry on here, fixing #10 and trying to get the test to work would be great start.
I'm not sure that we should add the test here though, there is only one other functional test and it is really really basic.
Because there are so few examples asking for contributors to write tests isn't great.
Comment #13
manuel garcia commentedRe #10.1 - unfortunately this is a static method so we're not in object context.
Re #10.2 - Same answer, it's a static method so $this isn't available.
Re #12
I agree here, we should probably open up issues to get tests in shape for this module.
Nit: Extra new line
Comment #15
jhedstromCommitted #8. Thanks all! (Extra line fixed on commit.)