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

Frontend not works after updated to Craft CMS 3.3.20.1, but works when there is ?token query string in frontend URL #5475

Closed
venislaus opened this issue Jan 22, 2020 · 19 comments

Comments

@venislaus
Copy link

venislaus commented Jan 22, 2020

Description

Frontend not works after updated to Craft CMS 3.3.20.1, but works when there is '?token' query string.
I am getting "Internal Server Error" where '?token' query not passed (i added manually in browser url)
But admin section works fine
Before updating Craft CMS frontend never required '?token' query string in URL, it worked without '?token' parameter
Please suggest me how to make frontend as before that is without '?token' query string parameter in URL

Additional info

  • Craft version: Craft CMS 3.3.20.1
  • PHP version: 7.2.7
  • Database driver & version: MySQL 5.6.40
  • Plugins & versions:
@venislaus venislaus changed the title Frontend not works after update to Craft CMS 3.3.20.1, but works when there in ?token query string Frontend not works after update to Craft CMS 3.3.20.1, but works when there is ?token query string in frontend URL Jan 22, 2020
@venislaus venislaus changed the title Frontend not works after update to Craft CMS 3.3.20.1, but works when there is ?token query string in frontend URL Frontend not works after updated to Craft CMS 3.3.20.1, but works when there is ?token query string in frontend URL Jan 22, 2020
@brandonkelly
Copy link
Member

Try clearing out your storage/logs/ folder, then reload your front-end site, and check the logs folder again. Did a web.log file get created? Do you see any [error] logs inside it?

@venislaus
Copy link
Author

web.log
@brandonkelly Yes i see [error] in web.log , and i have attached web.log. Please check and suggest me

@brandonkelly
Copy link
Member

It looks like there may be an issue with your MySQL connection, per the “MySQL server has gone away” error. There are also errors related to SEOmatic – can you try disabling that plugin in Settings → Plugins, and see if that helps?

@venislaus
Copy link
Author

venislaus commented Jan 23, 2020

I disabled SEOmatic plugin but still issue occurs
I also don't think it is not related to MYSQL related, because when url is with '?token' it works fine

Attached updated web.log file
Please help me to fix this issue
web.log
seomatic-2
seomatic-1

@brandonkelly
Copy link
Member

Here’s a guide that explains how to disable a plugin: https://craftcms.com/guides/disable-a-plugin

@narration-sd
Copy link
Contributor

maybe useful that a tooltip on the disable/remove pop-up menus could give a local reminder and brief explanation for how this area is supposed to work?

@venislaus
Copy link
Author

@brandonkelly i disabled plugin as you have mentioned but still the issue occurs.
Attached web.log
web.log
plugins

@brandonkelly
Copy link
Member

Thanks, that has narrowed the issue down to the MySQL server has gone away error, which you’re still getting.

Looks like this is occurring when Craft is trying to write to the templatecachequeries table. You might try increasing MySQL’s max_allowed_packet and wait_timeout settings. Or as a quick fix, you can remove your {% cache %} tags.

@venislaus
Copy link
Author

@brandonkelly Thank you very much.
I disabled cache in config/general.php by setting 'enableTemplateCaching' => false,
I will look on to increasing MySQL’s max_allowed_packet and wait_timeout settings as well.
Thanks again

@brandonkelly
Copy link
Member

brandonkelly commented Jan 24, 2020

Sorry, I should have also mentioned, you can specifically disable element query caching via the cacheElementQueries config setting (without disabling template caching altogether).

'cacheElementQueries' => false,

Note that if you do this, your caches won't automatically clear themselves when you create new entries, so you need to manually clear them.

At that point, it may make more sense to switch over to using the Cache Flag plugin instead of the native {% cache %} tags.

@venislaus
Copy link
Author

Thanks @brandonkelly

@chandamotiyani
Copy link

Hi,

When login into craft admin panel through localhost/projectname/admin and then we navigate to another tab in the same browser where there is frontend loaded and click on the detail of the "xyz" product then session issues are occuring, can you please suggest something on this?

Is it in craft cannot we have frontend and backend working at the same time in same browser?

Thanks

@brandonkelly
Copy link
Member

@chandamotiyani Do you have multiple separate Craft installations all running from http://localhost? If so, you will need to make some config changes so each of those Craft installs play nice with each other: https://craftcms.com/knowledge-base/running-multiple-craft-installations-from-the-same-domain

@chandamotiyani
Copy link

chandamotiyani commented Jun 25, 2020

Hi @brandonkelly
Thank you so much for your response but there is only one installation currently and that is what I am running on localhost but in that single project where craft is installed, what I'm not able to do is that following:
when I'm logged into admin panel/control panel at the same time if I'm opening its frontend where the site is showing the stuff set in admin panel they are giving following error:

2020-06-24 15:16:20 [-][9][640rgjqqkqturjpa21ccv5qr6e][error][yii\base\ErrorException:8] yii\base\ErrorException: Trying to get property 'id' of non-object in /Users/chandavyas/websites/yalumba-craftcms-website/modules/Events/Elements/Schedule.php:405
Stack trace:
#0 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(8, 'Trying to get p...', '/Users/chandavy...', 405)
#1 /Users/chandavyas/websites/yalumba-craftcms-website/modules/Events/Elements/Schedule.php(405): craft\web\ErrorHandler->handleError(8, 'Trying to get p...', '/Users/chandavy...', 405, Array)
#2 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(429): modules\Events\Elements\Schedule->getPromotionRelationSource()
#3 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(283): craft\commerce\services\Sales->matchPurchasableAndSale(Object(modules\Events\Elements\Schedule), Object(craft\commerce\models\Sale), Object(craft\commerce\elements\Order))
#4 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(333): craft\commerce\services\Sales->getSalesForPurchasable(Object(modules\Events\Elements\Schedule), Object(craft\commerce\elements\Order))
#5 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/models/LineItem.php(631): craft\commerce\services\Sales->getSalePriceForPurchasable(Object(modules\Events\Elements\Schedule), Object(craft\commerce\elements\Order))
#6 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/models/LineItem.php(579): craft\commerce\models\LineItem->populateFromPurchasable(Object(modules\Events\Elements\Schedule))
#7 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/elements/Order.php(1551): craft\commerce\models\LineItem->refreshFromPurchasable()
#8 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/elements/Order.php(1643): craft\commerce\elements\Order->recalculate()
#9 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/services/Elements.php(2126): craft\commerce\elements\Order->afterSave(false)
#10 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/services/Elements.php(531): craft\services\Elements->_saveElementInternal(Object(craft\commerce\elements\Order), false, false, true)
#11 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Carts.php(110): craft\services\Elements->saveElement(Object(craft\commerce\elements\Order), false)
#12 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Extension/CoreExtension.php(1499): craft\commerce\services\Carts->getCart()
#13 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/helpers/Template.php(96): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\commerce\services\Carts), 'getCart', Array, 'method', false, false)
#14 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/6c/6c8f1eb3e5075077e893a7fe5f3b8e8c88373d2128378c0332bafb0528b23db4.php(41): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig\Source), Object(craft\commerce\services\Carts), 'getCart', Array, 'method')
#15 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(407): __TwigTemplate_69c6c9bb76238fdee76ae369758d243dfdfe2c62668add9ff063737319e0419d->doDisplay(Array, Array)
#16 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#17 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/ad/ad30ea828f1ef1449899536adfef9d236777ea94b3d0844d219162d3d28666ed.php(170): Twig\Template->display(Array)
#18 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(184): __TwigTemplate_8d09b34a42c8ca8f9d030b9ce3bba4e71d4f3332233807a78076bda9d9f10c42->block_primaryNavigation(Array, Array)
#19 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/ad/ad30ea828f1ef1449899536adfef9d236777ea94b3d0844d219162d3d28666ed.php(39): Twig\Template->displayBlock('primaryNavigati...', Array, Array)
#20 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(407): __TwigTemplate_8d09b34a42c8ca8f9d030b9ce3bba4e71d4f3332233807a78076bda9d9f10c42->doDisplay(Array, Array)
#21 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#22 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/61/612b048aa4a232d5ef639acca2eb3e43d0cc72590e0f9c5f87b0bade851945d3.php(52): Twig\Template->display(Array)
#23 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(184): __TwigTemplate_7a90669038338963ddaac5a88af6757536910e6b5e2277fae2251fcd679de1c9->block_primaryNavigation(Array, Array)
#24 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/61/612b048aa4a232d5ef639acca2eb3e43d0cc72590e0f9c5f87b0bade851945d3.php(39): Twig\Template->displayBlock('primaryNavigati...', Array, Array)
#25 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(407): __TwigTemplate_7a90669038338963ddaac5a88af6757536910e6b5e2277fae2251fcd679de1c9->doDisplay(Array, Array)
#26 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#27 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/a9/a9e1fa8dbf9551ba2dbf12afe5a42edbfd0845bdcc2287ab1c277406e68d714d.php(357): Twig\Template->display(Array)
#28 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(184): __TwigTemplate_8ccd154390670ba1e92d9d30c490b2755c4510b314cc95cc4b9360a10f351cf9->block_header(Array, Array)
#29 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/a9/a9e1fa8dbf9551ba2dbf12afe5a42edbfd0845bdcc2287ab1c277406e68d714d.php(122): Twig\Template->displayBlock('header', Array, Array)
#30 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(407): __TwigTemplate_8ccd154390670ba1e92d9d30c490b2755c4510b314cc95cc4b9360a10f351cf9->doDisplay(Array, Array)
#31 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#32 /Users/chandavyas/websites/yalumba-craftcms-website/storage/runtime/compiled_templates/7b/7bfc554988be98c9e291d186f6ca31a098abc7a82f13569b20b50755a756db21.php(47): Twig\Template->display(Array, Array)
#33 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(407): __TwigTemplate_0e5cac41b0c06e58a9eaa4193a673187055aea525ca4c20931387349d12ba277->doDisplay(Array, Array)
#34 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#35 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Template.php(392): Twig\Template->display(Array)
#36 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#37 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#38 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/View.php(397): Twig\Environment->render('shop/wines/_pro...', Array)
#39 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/View.php(458): craft\web\View->renderTemplate('shop/wines/_pro...', Array)
#40 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Controller.php(235): craft\web\View->renderPageTemplate('shop/wines/_pro...', Array, 'site')
#41 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/controllers/TemplatesController.php(98): craft\web\Controller->renderTemplate('shop/wines/_pro...', Array)
#42 [internal function]: craft\controllers\TemplatesController->actionRender('shop/wines/_pro...', Array)
#43 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#44 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#45 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('render', Array)
#46 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render', Array)
#47 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('templates/rende...', Array)
#48 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('templates/rende...', Array)
#49 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))
#50 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#51 /Users/chandavyas/websites/yalumba-craftcms-website/web/index.php(21): yii\base\Application->run()
#52 /Users/chandavyas/.composer/vendor/laravel/valet/server.php(191): require('/Users/chandavy...')
#53 {main}
2020-06-24 15:16:19 [-][9][640rgjqqkqturjpa21ccv5qr6e][info][application] $_GET = []

$_POST = []

$_FILES = []

$_COOKIE = [
    '_ga' => 'GA1.2.755020786.1592897484'
    '_gid' => 'GA1.2.1016307320.1592897484'
    '_fbp' => 'fb.1.1592897483780.1587379765'
    '__qca' => 'P0-542731167-1592897485968'
    'CraftSessionId' => '640rgjqqkqturjpa21ccv5qr6e'
    '1031b8c41dfff97a311a7ac99863bdc5_identity' => '6b6da7ee266259c66cf76d3779de5cde5ab861eeaf339a6b32a659a454b60998a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:250:\"[\"9\",\"[\\\"Zj497ybyPaRVH01rxprmGLa0-NHWNIAjc8a_VgW9jxIASjK_dnqe1hFNN5DaA1wNzjsECqaZTqKkH5hD3qIUjrWlVcALMkfqSFvZ\\\",null,\\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36\\\"]\",3600]\";}'
    'CRAFT_CSRF_TOKEN' => '•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '1031b8c41dfff97a311a7ac99863bdc5_username' => 'bf03289cb9b44850728fcfa26955bc3aa6b7a035698c618a36f18f1b08db26cea:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:21:\"[email protected]\";}'
]

$_SESSION = [
    'bd62416aa8538ede709019a5e113eea5__flash' => []
    'wishlist_list' => '041674224d30314f6e5332bdf1899f10'
    '1031b8c41dfff97a311a7ac99863bdc5__token' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '1031b8c41dfff97a311a7ac99863bdc5__id' => '9'
    '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1592981179
    'commerce_cart' => 'a5bfdf7c14a5dd5bc76969d34435b3ed'
    'commerce_customer' => '1'
]

$_SERVER = [
    'USER' => 'chandavyas'
    'HOME' => '/Users/chandavyas'
    'HTTP_COOKIE' => '_ga=GA1.2.755020786.1592897484; _gid=GA1.2.1016307320.1592897484; _fbp=fb.1.1592897483780.1587379765; __qca=P0-542731167-1592897485968; CraftSessionId=640rgjqqkqturjpa21ccv5qr6e; 1031b8c41dfff97a311a7ac99863bdc5_identity=6b6da7ee266259c66cf76d3779de5cde5ab861eeaf339a6b32a659a454b60998a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A250%3A%22%5B%229%22%2C%22%5B%5C%22Zj497ybyPaRVH01rxprmGLa0-NHWNIAjc8a_VgW9jxIASjK_dnqe1hFNN5DaA1wNzjsECqaZTqKkH5hD3qIUjrWlVcALMkfqSFvZ%5C%22%2Cnull%2C%5C%22Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_6%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F83.0.4103.116+Safari%2F537.36%5C%22%5D%22%2C3600%5D%22%3B%7D; CRAFT_CSRF_TOKEN=05d4c3b4ed123b9c0a264e88f88e4f5d6c677428206aef7ecaa55d749c49a81da%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A208%3A%22FOh-AVenGfVGFCtLh52pdE-YXUdjbbU1iRy0htth%7C0b4fec615b3d071b28cbd0f91001c46893a05640f62cadf6f184e94a3baed0f3FOh-AVenGfVGFCtLh52pdE-YXUdjbbU1iRy0htth%7C9%7C%242y%2413%247SV7NB8f3tkFw9c%2FINAjWe.ldopFbk%2FDQIvC.Kr.4pXs043GYOJtW%22%3B%7D; 1031b8c41dfff97a311a7ac99863bdc5_username=bf03289cb9b44850728fcfa26955bc3aa6b7a035698c618a36f18f1b08db26cea%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A21%3A%22webmaster%40kojo.com.au%22%3B%7D'
    'HTTP_ACCEPT_LANGUAGE' => 'en-GB,en-US;q=0.9,en;q=0.8'
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate, br'
    'HTTP_REFERER' => 'http://yalumba.localhost/shop/wines'
    'HTTP_SEC_FETCH_DEST' => 'document'
    'HTTP_SEC_FETCH_USER' => '?1'
    'HTTP_SEC_FETCH_MODE' => 'navigate'
    'HTTP_SEC_FETCH_SITE' => 'same-origin'
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'
    'HTTP_UPGRADE_INSECURE_REQUESTS' => '1'
    'HTTP_CACHE_CONTROL' => 'max-age=0'
    'HTTP_CONNECTION' => 'keep-alive'
    'HTTP_HOST' => 'yalumba.localhost'
    'PATH_INFO' => ''
    'REDIRECT_STATUS' => '200'
    'SERVER_NAME' => 'yalumba.localhost'
    'SERVER_PORT' => '80'
    'SERVER_ADDR' => '127.0.0.1'
    'REMOTE_PORT' => '53834'
    'REMOTE_ADDR' => '127.0.0.1'
    'SERVER_SOFTWARE' => 'nginx/1.19.0'
    'GATEWAY_INTERFACE' => 'CGI/1.1'
    'SERVER_PROTOCOL' => 'HTTP/1.1'
    'DOCUMENT_ROOT' => '/Users/chandavyas/websites/yalumba-craftcms-website/web'
    'DOCUMENT_URI' => '/Users/chandavyas/.composer/vendor/laravel/valet/server.php'
    'REQUEST_URI' => '/shop/premium-wines/the-menzies'
    'SCRIPT_NAME' => '/index.php'
    'SCRIPT_FILENAME' => '/Users/chandavyas/websites/yalumba-craftcms-website/web/index.php'
    'CONTENT_LENGTH' => ''
    'CONTENT_TYPE' => ''
    'REQUEST_METHOD' => 'GET'
    'QUERY_STRING' => ''
    'FCGI_ROLE' => 'RESPONDER'
    'PHP_SELF' => '/shop/premium-wines/the-menzies'
    'REQUEST_TIME_FLOAT' => 1592977579.5912
    'REQUEST_TIME' => 1592977579
    'ENVIRONMENT' => 'dev'
    'SECURITY_KEY' => '••••'
    'DB_DRIVER' => 'mysql'
    'DB_SERVER' => 'localhost'
    'DB_USER' => 'root'
    'DB_PASSWORD' => '••••'
    'DB_DATABASE' => 'yalumba_local'
    'DB_SCHEMA' => 'public'
    'DB_TABLE_PREFIX' => 'yal_'
    'DB_PORT' => ''
    'ASSET_BASE_PATH' => './assets'
    'ASSET_BASE_URL' => '/assets'
    'DEFAULT_SITE_URL' => 'http://yalumba.localhost'
    'MAIL_ADDRESS' => '[email protected]'
    'MAIL_SENDER_NAME' => 'KOJO'
    'MAIL_HOST_NAME' => 'smtp.mailtrap.io'
    'MAIL_PORT' => '2525'
    'MAIL_USERNAME' => '1234'
    'MAIL_PASSWORD' => '••••'
    'MAIL_DRIVER' => 'smtp'
    'SPREEDLY_ENVIRONMENT_KEY' => '••••'
    'SPREEDLY_ACCESS_SECRET' => '••••'
    'SPREEDLY_GATEWAY_TOKEN' => '••••'
    'SPREEDLY_TEST_MODE_GATEWAY_TOKEN' => '••••'
    'SPREEDLY_TEST_MODE' => 'true'
    'S3_DATA_FEED_ACCESS_KEY' => '••••'
    'S3_DATA_FEED_ACCESS_SECRET' => '••••'
    'S3_DATA_FEED_BUCKET' => 'yalumba-data-feed'
    'S3_DATA_FEED_REGION' => 'ap-southeast-2'
    'S3_DATA_FEED_VERSION' => 'latest'
    'YALUMBA_API_SUBSCRIPTION_KEY' => '••••'
    'YALUMBA_API_HOST' => 'https://devapi.samsmith.com.au'
    'VEND_API_CLIENT_KEY' => '••••'
    'VEND_API_CLIENT_SECRET' => '••••'
    'VEND_API_PERSONAL_TOKEN' => '••••'
    'VEND_DOMAIN_PREFIX' => '1234'
    'VEND_INSIDER_CUSTOMER_GROUP' => '1234'
    'VEND_DABBLER_CUSTOMER_GROUP' => '1234'
    'VEND_ADVENTURER_CUSTOMER_GROUP' => '1234'
    'REZDY_CLIENT_KEY' => '••••'
    'REZDY_CLIENT_SECRET' => '••••'
    'REZDY_API_KEY' => '••••'
    'REZDY_DOMAIN_PREFIX' => '1234'
    'REZDY_URL' => 'api.rezdy-staging.com/v1'
    'S3_KEY_ID' => '••••••••••••••••••••'
    'S3_SECRET' => '••••••••••••••••••••••••••••••••••••••••'
    'S3_BUCKET' => 'yalumba-cms-assets-dev'
    'S3_REGION' => 'ap-southeast-2'
    'CLOUDFRONT_URL' => 'https://yalumba-cms-assets-dev.s3-ap-southeast-2.amazonaws.com'
    'CLOUDFRONT_DISTRIBUTION_ID' => ''
    'CLOUDFRONT_PATH_PREFIX' => ''
]
2020-06-24 15:16:22 [-][9][-][error][yii\base\ErrorException:8] yii\base\ErrorException: Trying to get property 'id' of non-object in /Users/chandavyas/websites/yalumba-craftcms-website/modules/Events/Elements/Schedule.php:405
Stack trace:
#0 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(8, 'Trying to get p...', '/Users/chandavy...', 405)
#1 /Users/chandavyas/websites/yalumba-craftcms-website/modules/Events/Elements/Schedule.php(405): craft\web\ErrorHandler->handleError(8, 'Trying to get p...', '/Users/chandavy...', 405, Array)
#2 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(429): modules\Events\Elements\Schedule->getPromotionRelationSource()
#3 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(283): craft\commerce\services\Sales->matchPurchasableAndSale(Object(modules\Events\Elements\Schedule), Object(craft\commerce\models\Sale), Object(craft\commerce\elements\Order))
#4 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Sales.php(333): craft\commerce\services\Sales->getSalesForPurchasable(Object(modules\Events\Elements\Schedule), Object(craft\commerce\elements\Order))
#5 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/models/LineItem.php(631): craft\commerce\services\Sales->getSalePriceForPurchasable(Object(modules\Events\Elements\Schedule), Object(craft\commerce\elements\Order))
#6 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/models/LineItem.php(579): craft\commerce\models\LineItem->populateFromPurchasable(Object(modules\Events\Elements\Schedule))
#7 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/elements/Order.php(1551): craft\commerce\models\LineItem->refreshFromPurchasable()
#8 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/elements/Order.php(1643): craft\commerce\elements\Order->recalculate()
#9 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/services/Elements.php(2126): craft\commerce\elements\Order->afterSave(false)
#10 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/services/Elements.php(531): craft\services\Elements->_saveElementInternal(Object(craft\commerce\elements\Order), false, false, true)
#11 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/services/Carts.php(110): craft\services\Elements->saveElement(Object(craft\commerce\elements\Order), false)
#12 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/controllers/CartController.php(410): craft\commerce\services\Carts->getCart(false)
#13 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/commerce/src/controllers/CartController.php(57): craft\commerce\controllers\CartController->_getCart()
#14 [internal function]: craft\commerce\controllers\CartController->actionGetCart()
#15 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#16 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#17 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('get-cart', Array)
#18 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('get-cart', Array)
#19 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('commerce/cart/g...', Array)
#20 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Application.php(559): craft\web\Application->runAction('commerce/cart/g...', Array)
#21 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/craftcms/cms/src/web/Application.php(270): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#22 /Users/chandavyas/websites/yalumba-craftcms-website/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#23 /Users/chandavyas/websites/yalumba-craftcms-website/web/index.php(21): yii\base\Application->run()
#24 /Users/chandavyas/.composer/vendor/laravel/valet/server.php(191): require('/Users/chandavy...')
#25 {main}
2020-06-24 15:16:21 [-][9][-][info][application] $_GET = []

$_POST = [
    'action' => 'commerce/cart/get-cart'
    'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
]

$_FILES = []

$_COOKIE = [
    '_ga' => 'GA1.2.755020786.1592897484'
    '_gid' => 'GA1.2.1016307320.1592897484'
    '_fbp' => 'fb.1.1592897483780.1587379765'
    '__qca' => 'P0-542731167-1592897485968'
    'CraftSessionId' => '640rgjqqkqturjpa21ccv5qr6e'
    '1031b8c41dfff97a311a7ac99863bdc5_identity' => '6b6da7ee266259c66cf76d3779de5cde5ab861eeaf339a6b32a659a454b60998a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:250:\"[\"9\",\"[\\\"Zj497ybyPaRVH01rxprmGLa0-NHWNIAjc8a_VgW9jxIASjK_dnqe1hFNN5DaA1wNzjsECqaZTqKkH5hD3qIUjrWlVcALMkfqSFvZ\\\",null,\\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36\\\"]\",3600]\";}'
    'CRAFT_CSRF_TOKEN' => '•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '1031b8c41dfff97a311a7ac99863bdc5_username' => 'bf03289cb9b44850728fcfa26955bc3aa6b7a035698c618a36f18f1b08db26cea:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:21:\"[email protected]\";}'
]

$_SESSION = [
    'bd62416aa8538ede709019a5e113eea5__flash' => []
    'wishlist_list' => '041674224d30314f6e5332bdf1899f10'
    '1031b8c41dfff97a311a7ac99863bdc5__token' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '1031b8c41dfff97a311a7ac99863bdc5__id' => '9'
    '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1592981181
    'commerce_cart' => 'a5bfdf7c14a5dd5bc76969d34435b3ed'
    'commerce_customer' => '1'
]

$_SERVER = [
    'USER' => 'chandavyas'
    'HOME' => '/Users/chandavyas'
    'HTTP_COOKIE' => '_ga=GA1.2.755020786.1592897484; _gid=GA1.2.1016307320.1592897484; _fbp=fb.1.1592897483780.1587379765; __qca=P0-542731167-1592897485968; CraftSessionId=640rgjqqkqturjpa21ccv5qr6e; 1031b8c41dfff97a311a7ac99863bdc5_identity=6b6da7ee266259c66cf76d3779de5cde5ab861eeaf339a6b32a659a454b60998a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A250%3A%22%5B%229%22%2C%22%5B%5C%22Zj497ybyPaRVH01rxprmGLa0-NHWNIAjc8a_VgW9jxIASjK_dnqe1hFNN5DaA1wNzjsECqaZTqKkH5hD3qIUjrWlVcALMkfqSFvZ%5C%22%2Cnull%2C%5C%22Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_6%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F83.0.4103.116+Safari%2F537.36%5C%22%5D%22%2C3600%5D%22%3B%7D; CRAFT_CSRF_TOKEN=05d4c3b4ed123b9c0a264e88f88e4f5d6c677428206aef7ecaa55d749c49a81da%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A208%3A%22FOh-AVenGfVGFCtLh52pdE-YXUdjbbU1iRy0htth%7C0b4fec615b3d071b28cbd0f91001c46893a05640f62cadf6f184e94a3baed0f3FOh-AVenGfVGFCtLh52pdE-YXUdjbbU1iRy0htth%7C9%7C%242y%2413%247SV7NB8f3tkFw9c%2FINAjWe.ldopFbk%2FDQIvC.Kr.4pXs043GYOJtW%22%3B%7D; 1031b8c41dfff97a311a7ac99863bdc5_username=bf03289cb9b44850728fcfa26955bc3aa6b7a035698c618a36f18f1b08db26cea%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A21%3A%22webmaster%40kojo.com.au%22%3B%7D'
    'HTTP_ACCEPT_LANGUAGE' => 'en-GB,en-US;q=0.9,en;q=0.8'
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate, br'
    'HTTP_REFERER' => 'http://yalumba.localhost/shop/premium-wines/the-menzies'
    'HTTP_SEC_FETCH_DEST' => 'empty'
    'HTTP_SEC_FETCH_MODE' => 'cors'
    'HTTP_SEC_FETCH_SITE' => 'same-origin'
    'HTTP_ORIGIN' => 'http://yalumba.localhost'
    'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'
    'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest'
    'HTTP_ACCEPT' => 'application/json'
    'HTTP_CONTENT_LENGTH' => '609'
    'HTTP_CONNECTION' => 'keep-alive'
    'HTTP_HOST' => 'yalumba.localhost'
    'PATH_INFO' => ''
    'REDIRECT_STATUS' => '200'
    'SERVER_NAME' => 'yalumba.localhost'
    'SERVER_PORT' => '80'
    'SERVER_ADDR' => '127.0.0.1'
    'REMOTE_PORT' => '53834'
    'REMOTE_ADDR' => '127.0.0.1'
    'SERVER_SOFTWARE' => 'nginx/1.19.0'
    'GATEWAY_INTERFACE' => 'CGI/1.1'
    'SERVER_PROTOCOL' => 'HTTP/1.1'
    'DOCUMENT_ROOT' => '/Users/chandavyas/websites/yalumba-craftcms-website/web'
    'DOCUMENT_URI' => '/Users/chandavyas/.composer/vendor/laravel/valet/server.php'
    'REQUEST_URI' => '/commerce/cart/get-cart'
    'SCRIPT_NAME' => '/index.php'
    'SCRIPT_FILENAME' => '/Users/chandavyas/websites/yalumba-craftcms-website/web/index.php'
    'CONTENT_LENGTH' => '609'
    'CONTENT_TYPE' => 'application/x-www-form-urlencoded'
    'REQUEST_METHOD' => 'POST'
    'QUERY_STRING' => ''
    'FCGI_ROLE' => 'RESPONDER'
    'PHP_SELF' => '/commerce/cart/get-cart'
    'REQUEST_TIME_FLOAT' => 1592977581.2096
    'REQUEST_TIME' => 1592977581
    'ENVIRONMENT' => 'dev'
    'SECURITY_KEY' => '••••'
    'DB_DRIVER' => 'mysql'
    'DB_SERVER' => 'localhost'
    'DB_USER' => 'root'
    'DB_PASSWORD' => '••••'
    'DB_DATABASE' => 'yalumba_local'
    'DB_SCHEMA' => 'public'
    'DB_TABLE_PREFIX' => 'yal_'
    'DB_PORT' => ''
    'ASSET_BASE_PATH' => './assets'
    'ASSET_BASE_URL' => '/assets'
    'DEFAULT_SITE_URL' => 'http://yalumba.localhost'
    'MAIL_ADDRESS' => '[email protected]'
    'MAIL_SENDER_NAME' => 'KOJO'
    'MAIL_HOST_NAME' => 'smtp.mailtrap.io'
    'MAIL_PORT' => '2525'
    'MAIL_USERNAME' => '1234'
    'MAIL_PASSWORD' => '••••'
    'MAIL_DRIVER' => 'smtp'
    'SPREEDLY_ENVIRONMENT_KEY' => '••••'
    'SPREEDLY_ACCESS_SECRET' => '••••'
    'SPREEDLY_GATEWAY_TOKEN' => '••••'
    'SPREEDLY_TEST_MODE_GATEWAY_TOKEN' => '••••'
    'SPREEDLY_TEST_MODE' => 'true'
    'S3_DATA_FEED_ACCESS_KEY' => '••••'
    'S3_DATA_FEED_ACCESS_SECRET' => '••••'
    'S3_DATA_FEED_BUCKET' => 'yalumba-data-feed'
    'S3_DATA_FEED_REGION' => 'ap-southeast-2'
    'S3_DATA_FEED_VERSION' => 'latest'
    'YALUMBA_API_SUBSCRIPTION_KEY' => '••••'
    'YALUMBA_API_HOST' => 'https://devapi.samsmith.com.au'
    'VEND_API_CLIENT_KEY' => '••••'
    'VEND_API_CLIENT_SECRET' => '••••'
    'VEND_API_PERSONAL_TOKEN' => '••••'
    'VEND_DOMAIN_PREFIX' => '1234'
    'VEND_INSIDER_CUSTOMER_GROUP' => '1234'
    'VEND_DABBLER_CUSTOMER_GROUP' => '1234'
    'VEND_ADVENTURER_CUSTOMER_GROUP' => '1234'
    'REZDY_CLIENT_KEY' => '••••'
    'REZDY_CLIENT_SECRET' => '••••'
    'REZDY_API_KEY' => '••••'
    'REZDY_DOMAIN_PREFIX' => '1234'
    'REZDY_URL' => 'api.rezdy-staging.com/v1'
    'S3_KEY_ID' => '••••••••••••••••••••'
    'S3_SECRET' => '••••••••••••••••••••••••••••••••••••••••'
    'S3_BUCKET' => 'yalumba-cms-assets-dev'
    'S3_REGION' => 'ap-southeast-2'
    'CLOUDFRONT_URL' => 'https://yalumba-cms-assets-dev.s3-ap-southeast-2.amazonaws.com'
    'CLOUDFRONT_DISTRIBUTION_ID' => ''
    'CLOUDFRONT_PATH_PREFIX' => ''

@brandonkelly
Copy link
Member

Looks like that error is coming from a custom Events module.

@chandamotiyani
Copy link

But also because of the session as well because POST request is not working once I log in into the admin panel of the same project whose front end is opened in the same browser in another tab, so I'm not able to go through the front end because it's throwing error on all the pages its just one of them where it's trying to get the property from POST request but not giving any results. So, can you please tell me that is there any way to go through the front end and the admin panel at the same time in the same browser for single installation of the project as I said already there are no multiple installations?

@brandonkelly
Copy link
Member

So, can you please tell me that is there any way to go through the front end and the admin panel at the same time in the same browser for single installation of the project as I said already there are no multiple installations?

Yes that is absolutely possible. I’m certain this is going to be an issue with your custom module, not with Craft.

@chandamotiyani
Copy link

@brandonkelly I request you to tell me the way with which we can log in the admin panel and view the front end of the same project in the same browser at the same time.
Thanks.

@brandonkelly
Copy link
Member

@chandamotiyani assuming they both are accessed from the same domain, there’s nothing special you need to do. It’s just like accessing two different pages of the Craft control panel at the same time – of course it’s possible. Try removing your custom module and see if that helps.

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

4 participants