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

(dev/core#316) Fix crash on Memcache systems when session key involves whitespace #12640

Merged

Conversation

xurizaemon
Copy link
Member

@xurizaemon xurizaemon commented Aug 9, 2018

Overview

As reported @ https://lab.civicrm.org/dev/core/issues/316, there seems to be an issue with Memcache compatibility - keys generated by Cache::cleanKey() permit whitespace, which Memcache does not allow.

This patch addresses the bug and also micro-optimizes some cache logic.

Before

After

  • Hopefully CiviCRM will function with Memcache again. Untested.
  • When reading from the cache, cleanKey() is called once.

Technical Details

Changes cache keys, so may indicate that we should run a cache reset. (But if caching is sane, that shouldn't be required?)

Comments

Note for reviewing: Since this issue was reported by a user who upgraded to an official release, there's an implication to me that we don't have memcache as part of our test matrix. This would then require manual testing (perhaps by the affected user) to confirm the fix (or I guess inclusion of memcache in our test matrix).

@civibot
Copy link

civibot bot commented Aug 9, 2018

(Standard links)

@xurizaemon xurizaemon requested a review from totten August 9, 2018 21:28
@totten totten changed the title Gl316 cache key no whitespace (dev/core#316) Fix crash on Memcache systems when session key involves whitespace Aug 9, 2018
@totten
Copy link
Member

totten commented Aug 9, 2018

(CiviCRM Review Template WORD-1.1)

  • (r-explain) Pass - I updated the title & description. It may make sense to tweak the "After" once there's been some r-run review.
  • (r-test)
    • Needs work - Could you update CRM_Core_BAO_CacheTest? (Incidentally, the test failure seems to indicate that the cleanKey() patch is filtering whitespace as expected.)
    • There's tangential/related test-coverage in tests/phpunit/E2E/Cache/, but the test-box only runs the tests in a stock MySQL-only environment. So I ran them manually and confirmed they pass with Redis, Memcache, and Memcached drivers.
  • (r-code) Pass
  • (r-doc) Pass
  • (r-maint) Pass: Agree with your assessment that tests should be run in more environments. That would be good follow-up project, but it doesn't need to block this PR.
  • (r-run) Unreviewed: Agree with Chris's comments about this - would be great if @christianwach could try the patch and see if it fixes the problem.
  • (r-user) Pass
  • (r-tech) Pass: Any code using cleanKey() necessarily has some constraints with how it can use the cache service, but this code is already using cleanKey(). I don't think tweaking the encoding has a substantive affect on the contract (as perceived by cache-using code).

Regarding this:

Changes cache keys, so may indicate that we should run a cache reset. (But if caching is sane, that shouldn't be required?)

Agree it should be OK as-is. The impact here is changing the effective-key used in memcache for anything involving a space. However, if the effective-key had a space in it before, then it was broken already, and the cache wouldn't be filled. (Update: My comment had a grain of truth... but was wrong/incomplete. The change also impacts non-memcache systems where spaces were fine. Never-the-less, I still think it's safe for the more general/obvious reasons... typical use-case: sysadmin upgrades to a new release with this patch, and the upgrader clears out all manner of caches+sessions per norm. Worst use-case: sysadmin manually applies patch on a non-memcache system... because they're crazy... and it has a momentary, de-facto impact of invalidating some caches+sessions. The old cache-data exists but should cycle out eventually.)


@xurizaemon since this is a recent regression, could you rebase the patch to target the RC branch (5.5)? After we merge it into the RC, then we can follow-up with (a) backport to stable (5.4) and (b) bulk merge-forward to master.

@xurizaemon xurizaemon changed the base branch from master to 5.5 August 10, 2018 10:18
@xurizaemon xurizaemon force-pushed the GL316-cache_key_no_whitespace branch from 2278143 to 8720352 Compare August 10, 2018 10:20
@christianwach
Copy link
Member

@xurizaemon Thanks for this - your code almost works 👍

I discovered that $key was still being prefixed by /CiviCRM Session/ even after the cleanKey() method had run. I had to change CiviCRM Session to CiviCRMSession in Container.php (for functionality) and Cache.php (for consistency). Both CiviCRM-Session and CiviCRM_Session produce 500 errors but the pure alphabetic CiviCRMSession works.

@xurizaemon
Copy link
Member Author

xurizaemon commented Aug 10, 2018

Have pushed an additional commit that would hopefully catch this ... let me know if that works!

@totten note that the previous changes weren't sufficient 😞

@christianwach
Copy link
Member

@xurizaemon One further issue I've run into is that Extensions cannot be installed while Memcached is being used:

$Fatal Error Details = array(3) {
  ["message"]=>
  string(19) "Unknown extension: "
  ["code"]=>
  NULL
  ["exception"]=>
  object(CRM_Extension_Exception_MissingException)#6982 (10) {
    ["errorData":"CRM_Core_Exception":private]=>
    array(1) {
      ["error_code"]=>
      int(0)
    }
    ... lots more debugging ...

As you can see, $key is empty in CRM_Extension_Container_Collection::getContainer() - I presume this is as a result of CRM_Extension_Container_Collection::getKeysToContainer() grabbing the containers with:

$k2c = $this->cache->get($this->cacheKey);

FWIW, turning Memcached off allows me to install Extensions.

This is replaces 95b6567.  The intent is to
have a delimiter every ten chars so that it's easy to read/confirm the
length of the string.

The delimiter was space, but this became a longer encoded char (`-20`)
and threw off the numbers. Switching to dash just gives a different encoded char.
To get the counts right, it needs ot be a pass-through char... like underscore.
@totten
Copy link
Member

totten commented Aug 11, 2018

Taking @christianwach's confirmation and a quick test I did locally, we've now got two r-run confirmations that this fixes the session thing.

For the r-test problem, I revised the patch for the long string test and pushed up.

@christianwach, I've tried on D7 and WP with 5.5 and haven't been able to replicate the problem with extension activation. I'll try again with 5.4+patch, and maybe we should have another issue for that?

Flagging merge-on-pass.

@eileenmcnaughton
Copy link
Contributor

Thanks @xurizaemon for fixing this!

@eileenmcnaughton
Copy link
Contributor

@christianwach just as an aside we are digging into adopting Redis off the back of this cache cleanup (which unfortunately stung you) - hopefully we'll do some performance tests soon

@eileenmcnaughton eileenmcnaughton merged commit 0ac8ea7 into civicrm:5.5 Aug 11, 2018
@xurizaemon xurizaemon deleted the GL316-cache_key_no_whitespace branch August 11, 2018 10:29
@christianwach
Copy link
Member

christianwach commented Aug 13, 2018

Apologies in advance if there's too much debugging info below - I've tried to debug the Install Extension process but I get lost in the intricacies of HTML_QuickForm so I thought dumping everything I can see might help. The problem in CRM_Extension_Container_Collection::getContainer() is that $key is not defined:

Array
(
    [method] => CRM_Extension_Container_Collection::getContainer
    [key] => 
    [k2c] => Array
        (
            [com.iatspayments.civicrm] => civiroot
            [org.civicrm.shoreditch] => default
        )

    [backtrace] => #0 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Extension/Container/Collection.php(111): CRM_Extension_Container_Collection->getContainer(NULL)
#1 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Extension/Mapper.php(185): CRM_Extension_Container_Collection->getPath(NULL)
#2 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php(85): CRM_Extension_Mapper->keyToInfo(NULL)
#3 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(585): CRM_Admin_Form_Extensions->preProcess()
#4 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(136): CRM_Core_Form->buildForm()
#5 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), 'next', 'Next')
#6 /path/to/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), 'next')
#7 /path/to/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), 'next')
#8 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle('next')
#9 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(398): CRM_Core_Controller->run()
#10 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(156): CRM_Core_Page_Basic->edit(1, NULL)
#11 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(121): CRM_Core_Page_Basic->run()
#12 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Admin_Page_Extensions->run(Array, NULL)
#13 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem(Array)
#14 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke(Array)
#15 /path/to/wp-content/plugins/civicrm/civicrm.php(1246): CRM_Core_Invoke::invoke(Array)
#16 [internal function]: CiviCRM_For_WordPress->invoke('')
#17 /path/to/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)
#18 /path/to/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#19 /path/to/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#20 /path/to/wp-admin/admin.php(224): do_action('toplevel_page_C...')
#21 {main}
)

Debugging further up the line in CRM_Admin_Form_Extensions::preProcess() shows the context, though it still doesn't show me exactly why $key is undefined:

Array
(
    [method] => CRM_Admin_Form_Extensions::preProcess
    [key] => 
    [id] => 
    [GET] => Array
        (
            [page] => CiviCRM
            [q] => civicrm/admin/extensions
            [noheader] => 1
        )

    [POST] => Array
        (
            [qfKey] => 926b1c386f5b9c64184e995104741f62_6496
            [_qf_default] => Extensions:next
            [_qf_Extensions_next] => Install
        )

    [REQUEST] => Array
        (
            [page] => CiviCRM
            [q] => civicrm/admin/extensions
            [noheader] => 1
            [qfKey] => 926b1c386f5b9c64184e995104741f62_6496
            [_qf_default] => Extensions:next
            [_qf_Extensions_next] => Install
        )

    [backtrace] => #0 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(585): CRM_Admin_Form_Extensions->preProcess()
#1 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(136): CRM_Core_Form->buildForm()
#2 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), 'next', 'Next')
#3 /path/to/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), 'next')
#4 /path/to/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), 'next')
#5 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle('next')
#6 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(398): CRM_Core_Controller->run()
#7 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php(156): CRM_Core_Page_Basic->edit(1, NULL)
#8 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php(121): CRM_Core_Page_Basic->run()
#9 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(309): CRM_Admin_Page_Extensions->run(Array, NULL)
#10 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem(Array)
#11 /path/to/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke(Array)
#12 /path/to/wp-content/plugins/civicrm/civicrm.php(1246): CRM_Core_Invoke::invoke(Array)
#13 [internal function]: CiviCRM_For_WordPress->invoke('')
#14 /path/to/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)
#15 /path/to/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
#16 /path/to/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#17 /path/to/wp-admin/admin.php(224): do_action('toplevel_page_C...')
#18 {main}
)

Here's what CRM_Admin_Form_Extensions looks like at the above moment:

    [this] => CRM_Admin_Form_Extensions Object
        (
            [_id:protected] => 
            [_values:protected] => Array
                (
                )

            [_BAOName:protected] => CRM_Core_BAO_Extension
            [_state:protected] => 
            [_name:protected] => Extensions
            [_title:protected] => 
            [_defaults] => Array
                (
                )

            [_options] => 
            [_action] => 1
            [_paymentProcessors:protected] => 
            [_paymentProcessorIDs] => 
            [_paymentProcessorID:protected] => 
            [_is_pay_later_enabled:protected] => 
            [_renderer:protected] => 
            [_dateFields:protected] => Array
                (
                )

            [unsavedChangesWarn:protected] => 
            [ajaxResponse] => Array
                (
                )

            [urlPath] => Array
                (
                    [0] => civicrm
                    [1] => admin
                    [2] => extensions
                )

            [context:protected] => 
            [controller] => CRM_Core_Controller_Simple Object
                (
                    [_title:protected] => CRM_Admin_Form_Extensions
                    [_key] => 926b1c386f5b9c64184e995104741f62_6496
                    [_scope:protected] => CRM_Admin_Form_Extensions_926b1c386f5b9c64184e995104741f62_6496
                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                        (
                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                            [_states:protected] => Array
                                (
                                    [Extensions] => CRM_Core_State Object
                                        (
                                            [_name:protected] => Extensions
                                            [_type:protected] => 3
                                            [_back:protected] => 
                                            [_next:protected] => 
                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                        )

                                )

                            [_pages:protected] => Array
                                (
                                    [CRM_Admin_Form_Extensions] => 
                                )

                            [_pageNames:protected] => Array
                                (
                                    [0] => Extensions
                                )

                            [_action:protected] => 0
                            [_name:protected] => 
                        )

                    [_embedded:protected] => 1
                    [_skipRedirection:protected] => 
                    [_print] => 0
                    [_generateQFKey] => 1
                    [_QFResponseType] => html
                    [_parent:protected] => 
                    [_destination] => 
                    [_entryURL] => 
                    [_pages] => Array
                        (
                            [Extensions] => CRM_Admin_Form_Extensions Object
 *RECURSION*
                        )

                    [_actions] => Array
                        (
                            [Extensions] => HTML_QuickForm_Action_Direct Object
                                (
                                )

                            [display] => CRM_Core_QuickForm_Action_Display Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [next] => CRM_Core_QuickForm_Action_Next Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [back] => CRM_Core_QuickForm_Action_Back Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [process] => CRM_Core_QuickForm_Action_Process Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [cancel] => CRM_Core_QuickForm_Action_Cancel Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [refresh] => CRM_Core_QuickForm_Action_Refresh Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [reload] => CRM_Core_QuickForm_Action_Reload Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [done] => CRM_Core_QuickForm_Action_Done Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [jump] => CRM_Core_QuickForm_Action_Jump Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [submit] => CRM_Core_QuickForm_Action_Submit Object
                                (
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                            [upload] => CRM_Core_QuickForm_Action_Upload Object
                                (
                                    [_uploadNames:protected] => Array
                                        (
                                            [0] => attachFile_1
                                            [1] => attachFile_2
                                            [2] => attachFile_3
                                            [3] => uploadFile
                                        )

                                    [_uploadDir:protected] => /path/to/wp-content/plugins/files/civicrm/upload/
                                    [_stateMachine:protected] => CRM_Core_StateMachine Object
                                        (
                                            [_controller:protected] => CRM_Core_Controller_Simple Object
 *RECURSION*
                                            [_states:protected] => Array
                                                (
                                                    [Extensions] => CRM_Core_State Object
                                                        (
                                                            [_name:protected] => Extensions
                                                            [_type:protected] => 3
                                                            [_back:protected] => 
                                                            [_next:protected] => 
                                                            [_stateMachine:protected] => CRM_Core_StateMachine Object
 *RECURSION*
                                                        )

                                                )

                                            [_pages:protected] => Array
                                                (
                                                    [CRM_Admin_Form_Extensions] => 
                                                )

                                            [_pageNames:protected] => Array
                                                (
                                                    [0] => Extensions
                                                )

                                            [_action:protected] => 0
                                            [_name:protected] => 
                                        )

                                )

                        )

                    [_name] => CRM_Admin_Form_Extensions_926b1c386f5b9c64184e995104741f62_6496
                    [_modal] => 1
                    [_actionName] => Array
                        (
                            [0] => Extensions
                            [1] => next
                        )

                )

            [_chainSelectFields:CRM_Core_Form:private] => Array
                (
                )

            [_actions] => Array
                (
                )

            [_formBuilt] => 1
            [_elements] => Array
                (
                )

            [_elementIndex] => Array
                (
                )

            [_duplicateIndex] => Array
                (
                )

            [_required] => Array
                (
                )

            [_jsPrefix] => Invalid information entered.
            [_jsPostfix] => Please correct these fields.
            [_datasource] => 
            [_defaultValues] => Array
                (
                )

            [_constantValues] => Array
                (
                )

            [_submitValues] => Array
                (
                    [qfKey] => 926b1c386f5b9c64184e995104741f62_6496
                    [_qf_default] => Extensions:next
                    [_qf_Extensions_next] => Install
                )

            [_submitFiles] => Array
                (
                )

            [_maxFileSize] => 41943040
            [_freezeAll] => 
            [_rules] => Array
                (
                )

            [_formRules] => Array
                (
                )

            [_errors] => Array
                (
                )

            [_requiredNote] => <span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%;"> denotes required field</span>
            [_flagSubmitted] => 1
            [_attributes] => Array
                (
                    [action] => https://domain.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/admin/extensions
                    [method] => post
                    [name] => Extensions
                    [id] => Extensions
                    [class] => CRM_Admin_Form_Extensions
                )

            [_tabOffset] => 0
            [_tab] => 	
            [_lineEnd] => 

            [_comment] => 
            [_key] => 
        )

So, somewhere at some point, the _key property is not being set.

@totten Can you suggest how I might be able to pinpoint what's going on?

@christianwach
Copy link
Member

@totten
Copy link
Member

totten commented Aug 17, 2018

I've filed the extension-install issue as https://lab.civicrm.org/dev/core/issues/336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants