yii2


Yii2 doesn't send cookies, with twig extension


In my Controller i use
\Yii::$app->response->cookies->add(new Cookie(['name' => 'name','value' => 'test'));
then in the end of action
return $this->render('index.twig', $params);
But cookies doesn't send, because yii (https://github.com/yiisoft/yii2-twig/blob/master/ViewRenderer.php#L121) use Twig Template class (https://github.com/fabpot/Twig/blob/master/lib/Twig/Template.php#L343),
in Template Class function render run ob_start, and then in Yii (https://github.com/yiisoft/yii2/blob/master/framework/web/Response.php#L341) used functions headers_sent and my cookies doesn't send, how i can fix this bug?

Related Links

Yii framework 2.0 pass parameter to eager loading relational database table
Which folder to add custom helper functions to in Yii
Yii2: Assigning javascript event to anchor tag in yii2
Hide Yii2 GridView Action buttons
Yii2 query condition with exists
Retrieving array of Controllers/Actions
How to change label text of the ActiveField?
download files using Yii2 gridFS
Yii2:Does login,signup & password reset forms work together in single view
Yii2: How to add textarea in yii2
how to call login page partially on index page in yii2
Execute my code before any action of any controller
Twitter Bootstrap integration in yii2
How to publish an asset within a widget in Yii2
Yii2: Method not allowed arror while logout action from different controller
Yii2 - Unable to resolve the request “TblHotel/create”

Categories

HOME
ms-access
date
atom-editor
netsuite
keycloak
google-api-php-client
plot
sd-card
cmd
ezpublish
upload
multiple-records
synchronization
cloudkit
clearcase-ucm
ab-testing
wkwebview
kvc
one-to-many
wpfdatagrid
uninstall
nhapi
dbclient
microsoft-chart-controls
siesta-swift
perlin-noise
vsts-build-task
file-format
web-mining
espeak
occlusion
az-application-insights
squib
sas-visual-analytics
eclipse-scout
grid.mvc
unixodbc
total-commander
s
.net-4.6.2
apple-news
cubic-spline
pango
clean-architecture
idisposable
nstextview
pearson
titanium-android
nested-sets
parallel-data-warehouse
bonobo
adxstudio-portals
contact-list
react-native-listview
wso2cloud
jms2
intellij-14
simple-framework
purge
jqgrid-formatter
computer-algebra-systems
coveralls
embedded-code
appfabric-cache
graph-api-explorer
device-orientation
javax.mail
npapi
operator-precedence
jscript.net
angularjs-ng-click
winddk
onactivityresult
has-many-through
jubula
yorick
didselectrowatindexpath
tidy
spring-io
ftps
qt-faststart
pygit2
robotics-studio
specification-pattern
path-separator
buildr
ohm
punbb
netdna-api
window-management
ext3
thunderbird-lightning
iweb
temporal-database
yagni
sustainable-pace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App