Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$this->getLayout->getBlock('myBlock') return false #1520

Open
ghost opened this issue Oct 26, 2018 · 1 comment
Open

$this->getLayout->getBlock('myBlock') return false #1520

ghost opened this issue Oct 26, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 26, 2018

I can't get block from layout

Layout for Page customer dashboard:

<customer_account_index>
    <turpentine_cache_flag value="0" />
</customer_account_index>

in my template file, I have a statement:

$myBlock = $this->getLayout->getBlock('myBlock'); // $myBlock: false;
$links = $myBlock->getLinks(); // (!) Fatal error: Call to a member function getLinks() on boolean

Header response:

Accept-Ranges: bytes
Age: 0
Cache-Control: no-store, no-cache, must-revalidate
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Fri, 26 Oct 2018 01:35:40 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: X-UA-Device, Accept-Encoding
Via: 1.1 varnish-v4
X-Frame-Options: SAMEORIGIN
X-Turpentine-Cache: 0
X-Turpentine-Esi: 1
X-UA-Device: pc
X-Varnish: 229441
X-Varnish-Currency: 
X-Varnish-Esi-Access: 
X-Varnish-Esi-Method: 
X-Varnish-Hits: 0
X-Varnish-Host: example.local
X-Varnish-Set-Cookie: frontend=t7ie7hf8e57b3t5ptq1ved5mg0; expires=Sun, 25-Nov-2018 01:35:38 GMT; Max-Age=2592000; path=/; domain=example.local; httponly
X-Varnish-Store: 
X-Varnish-URL: /customer/account/

Environment:

Varnish: 4.1
Turpentine: 0.7.4

@nstojadinovicwst
Copy link

getLayout() maybe?

@miguelbalparda miguelbalparda added old-invalid Issues created before 2018-01-01. Will close en mass on Feb 15. and removed old-invalid Issues created before 2018-01-01. Will close en mass on Feb 15. labels Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants