zikula-modules / Pages

Simple HTML Pages
https://ziku.la/
18 stars 4 forks source link

Cannot edit page #27

Closed craigh closed 10 years ago

craigh commented 10 years ago

edit page loads fine. Then clicking the "save" button (even making no changes) results in full blown exception:

Exception: Failed to decode form includes - this should not have happened at n/a in /Applications/MAMP/htdocs/core.git/src/lib/legacy/Zikula/Form/View.php line 943

at Zikula_Form_View->decodeIncludes() in /Applications/MAMP/htdocs/core.git/src/lib/legacy/Zikula/Form/View.php line 260

at Zikula_Form_View->execute('admin/modify.tpl', object(Pages_Handler_Modify)) in /Applications/MAMP/htdocs/modules/zkmod/Pages/lib/Pages/Controller/Admin.php line 42

at Pages_Controller_Admin->modify() in line

at call_user_func_array(array(object(Pages_Controller_Admin), 'modify'), array()) in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 1150

at ModUtil::exec('Pages', 'admin', 'modify', array(), false, null) in /Applications/MAMP/htdocs/core.git/src/lib/util/ModUtil.php line 1202

at ModUtil::func('Pages', 'admin', 'modify') in /Applications/MAMP/htdocs/core.git/src/lib/Zikula/Bundle/CoreBundle/EventListener/LegacyRouteListener.php line 104

at Zikula\Bundle\CoreBundle\EventListener\LegacyRouteListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) in line

at call_user_func(array(object(LegacyRouteListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 394

at Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher->Symfony\Component\HttpKernel\Debug{closure}(object(GetResponseEvent), 'kernel.request', object(Zikula_EventManager)) in line

at call_user_func(object(Closure), object(GetResponseEvent), 'kernel.request', object(Zikula_EventManager)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 164

at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure)), 'kernel.request', object(GetResponseEvent)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 53

at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php line 167

at Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', object(GetResponseEvent), null) in /Applications/MAMP/htdocs/core.git/src/lib/legacy/Zikula/EventManager.php line 99

at Zikula_EventManager->dispatch('kernel.request', object(GetResponseEvent)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 141

at Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 107

at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Zikula_Request_Http), '1') in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 66

at Symfony\Component\HttpKernel\HttpKernel->handle(object(Zikula_Request_Http), '1', true) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 64

at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Zikula_Request_Http), '1', true) in /Applications/MAMP/htdocs/core.git/src/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 188

at Symfony\Component\HttpKernel\Kernel->handle(object(Zikula_Request_Http)) in /Applications/MAMP/htdocs/core.git/src/index.php line 21

The sessions var '__form' seems to be absent.

@drak this is the issue I was referring to yesterday. This could be related to other Form lib bugs I'm struggling with.

craigh commented 10 years ago

refs https://github.com/zikula/core/issues/1189

this error is the exact same as the first error reported in that ticket, but that ticket apparently changed after the initial report.

/cc @cmfcmf @damon18

craigh commented 10 years ago

This is acting a bit differently now. I now get an exception when _loading_ the page (and the same error as above when submitting)...

ContextErrorException: Notice: Unknown: "id" returned as member variable from sleep() but does not exist in Unknown line 0 in Unknown line 0 at ErrorHandler->handle('8', 'Unknown: "id" returned as member variable from sleep() but does not exist', 'Unknown', '0', array('_GET' => array('module' => 'pages', 'type' => 'admin', 'func' => 'modify', 'pageid' => '1'), '_POST' => array(), '_COOKIE' => array('_zsid' => '7333cba21b4924ebf265679799d062db', 'DizkusLastVisit' => '1387228898'), '_FILES' => array(), '_ENV' => array('CF_USER_TEXT_ENCODING' => '0x0:0:0', 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices', 'PWD' => '/', 'SHLVL' => '2', 'DYLD_LIBRARYPATH' => '/Applications/MAMP/Library/lib', '' => '/Applications/MAMP/Library/bin/httpd'), '_REQUEST' => array('module' => 'pages', 'type' => 'admin', 'func' => 'modify', 'pageid' => '1', '_zsid' => '7333cba21b4924ebf265679799d062db', 'DizkusLastVisit' => '1387228898'), '_SERVER' => array('HTTP_HOST' => '127.0.0.1', 'HTTP_PRAGMA' => 'no-cache', 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', 'HTTP_COOKIE' => '_zsid=7333cba21b4924ebf265679799d062db; DizkusLastVisit=1387228898', 'HTTP_CONNECTION' => 'keep-alive', 'HTTPACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,/_;q=0.8', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/537.71', 'HTTP_ACCEPT_LANGUAGE' => 'en-us', 'HTTP_REFERER' => 'http://127.0.0.1/core.git/src/index.php?module=pages&type=admin&func=view', 'HTTP_CACHE_CONTROL' => 'no-cache', 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache', 'SERVER_NAME' => '127.0.0.1', 'SERVER_ADDR' => '127.0.0.1', 'SERVER_PORT' => '80', 'REMOTE_ADDR' => '127.0.0.1', 'DOCUMENT_ROOT' => '/Applications/MAMP/htdocs', 'SERVER_ADMIN' => 'you@example.com', 'SCRIPT_FILENAME' => '/Applications/MAMP/htdocs/core.git/src/index.php', 'REMOTE_PORT' => '51963', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => 'module=pages&type=admin&func=modify&pageid=1', 'REQUEST_URI' => '/core.git/src/index.php?module=pages&type=admin&func=modify&pageid=1', 'SCRIPT_NAME' => '/core.git/src/index.php', 'PHP_SELF' => '/core.git/src/index.php', 'REQUEST_TIME_FLOAT' => '1387233408.51', 'REQUEST_TIME' => '1387233408', 'argv' => array('module=pages&type=admin&func=modify&pageid=1'), 'argc' => '1'), 'GLOBALS' => array('_GET' => array('module' => 'pages', 'type' => 'admin', 'func' => 'modify', 'pageid' => '1'), '_POST' => array(), '_COOKIE' => array(DEEP NESTED ARRAY), '_FILES' => array(DEEP NESTED ARRAY), '_ENV' => array(DEEP NESTED ARRAY), '_REQUEST' => array(DEEP NESTED ARRAY), '_SERVER' => array(DEEP NESTED ARRAY), 'GLOBALS' => array(DEEP NESTED ARRAY), 'loader' => object(ClassLoader), 'kernelConfig' => array(DEEP NESTED ARRAY), 'file' => '/Applications/MAMP/htdocs/core.git/src/lib/../app/config/custom_parameters.yml', 'ZConfig' => array(DEEP NESTED ARRAY), 'kernel' => object(ZikulaKernel), 'core' => object(Zikula_Core), 'config' => array(DEEP NESTED ARRAY), 'request' => object(Zikula_Request_Http), 'request' => object(Zikula_Request_Http), '_SESSION' => array(DEEP NESTED ARRAY), 'authinfogathered' => array(DEEP NESTED ARRAY), '_pageVars' => array(DEEP NESTED ARRAY), '_catSortField' => 'sort_value', 'blocks_modules' => array(DEEP NESTED ARRAY), 'response' => object(Response)), 'loader' => object(ClassLoader), 'kernelConfig' => array('installed' => true, 'env' => 'dev', 'debug' => true, 'compat_layer' => true, 'temp_dir' => '%kernel.cache_dir%/ztemp', 'datadir' => 'userdata', 'system.chmod_dir' => '511', 'database_driver' => 'pdo_mysql', 'database_host' => 'localhost', 'database_port' => null, 'database_name' => 'zk13x', 'database_user' => 'root', 'database_password' => 'root', 'database_path' => null, 'database_socket' => null, 'pagerendertime' => false, 'mailer_transport' => 'smtp', 'mailer_host' => '127.0.0.1', 'mailer_user' => null, 'mailer_password' => null, 'locale' => 'en', 'secret' => 'ThisTokenIsNotSoSecretChangeIt'), 'file' => '/Applications/MAMP/htdocs/core.git/src/lib/../app/config/custom_parameters.yml', 'ZConfig' => array('System' => array(DEEP NESTED ARRAY), 'DBInfo' => array(DEEP NESTED ARRAY), 'Log' => array(DEEP NESTED ARRAY), 'Multisites' => array(DEEP NESTED ARRAY)), 'kernel' => object(ZikulaKernel), 'core' => object(Zikula_Core), 'config' => array(DEEP NESTED ARRAY), 'request' => object(Zikula_Request_Http), '__request' => object(Zikula_Request_Http), '_SESSION' => array(DEEP NESTED ARRAY), 'authinfogathered' => array(DEEP NESTED ARRAY), '_pageVars' => array(DEEP NESTED ARRAY), '_catSortField' => 'sort_value', 'blocks_modules' => array(DEEP NESTED ARRAY), 'response' => object(Response))) at session_write_close()

craigh commented 10 years ago

@drak - can you look into this?

you can see it in action here: http://ntq.zikula.org/core/src/index.php?module=pages&type=admin&func=modify&pageid=1

I'm sure the second error is the cause for the first.

craigh commented 10 years ago

I've figured out this has something to do with the categories implementation either at the Form level or in Pages

craigh commented 10 years ago

@cmfcmf this is the ticket related to the editing problem in pages we discussed today. maybe you can continue to help?

craigh commented 10 years ago

fixed with https://github.com/zikula/core/pull/1520