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

Deleting a button from a multi-button Hyper field in a global causes a server error #98

Closed
darylknight opened this issue Oct 25, 2023 · 1 comment

Comments

@darylknight
Copy link
Contributor

Describe the bug

Sorry I don't have a ton of context here - hoping the logs will help. Inside a global, on the second tab, I have a multi-button Hyper field. I just tried to delete a link and save the global, and got a server error, log below.

Screenshot of how it looks:

image

I deleted on of the Entry links, not the link to the URL.

2023-10-25 08:11:03 [web.ERROR] [yii\base\InvalidArgumentException] Invalid numeric value: https://resources.[domain].org/login {"trace":["#0 /home/ploi/[domain]]/vendor/craftcms/cms/src/helpers/Db.php(856): craft\\helpers\\Db::parseParam()","#1 /home/ploi/[domain]]/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1417): craft\\helpers\\Db::parseNumericParam()","#2 /home/ploi/[domain]]/vendor/yiisoft/yii2/db/QueryBuilder.php(227): craft\\elements\\db\\ElementQuery->prepare()","#3 /home/ploi/[domain]]/vendor/yiisoft/yii2/db/Query.php(157): yii\\db\\QueryBuilder->build()","#4 /home/ploi/[domain]]/vendor/yiisoft/yii2/db/Query.php(287): yii\\db\\Query->createCommand()","#5 /home/ploi/[domain]]/vendor/craftcms/cms/src/db/Query.php(275): yii\\db\\Query->one()","#6 /home/ploi/[domain]]/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1604): craft\\db\\Query->one()","#7 /home/ploi/[domain]]/vendor/verbb/hyper/src/base/ElementLink.php(172): craft\\elements\\db\\ElementQuery->one()","#8 /home/ploi/[domain]]/vendor/verbb/hyper/src/services/ElementCache.php(120): verbb\\hyper\\base\\ElementLink->getElement()","#9 /home/ploi/[domain]]/vendor/verbb/hyper/src/fields/HyperField.php(306): verbb\\hyper\\services\\ElementCache->upsertCache()","#10 /home/ploi/[domain]]/vendor/craftcms/cms/src/base/Element.php(5160): verbb\\hyper\\fields\\HyperField->afterElementSave()","#11 /home/ploi/[domain]]/vendor/craftcms/cms/src/services/Elements.php(3383): craft\\base\\Element->afterSave()","#12 /home/ploi/[domain]]/vendor/craftcms/cms/src/services/Elements.php(1097): craft\\services\\Elements->_saveElementInternal()","#13 /home/ploi/[domain]]/vendor/craftcms/cms/src/controllers/GlobalsController.php(223): craft\\services\\Elements->saveElement()","#14 [internal function]: craft\\controllers\\GlobalsController->actionSaveContent()","#15 /home/ploi/[domain]]/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#16 /home/ploi/[domain]]/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","#17 /home/ploi/[domain]]/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()","#18 /home/ploi/[domain]]/vendor/craftcms/cms/src/web/Application.php(305): yii\\base\\Module->runAction()","#19 /home/ploi/[domain]]/vendor/craftcms/cms/src/web/Application.php(608): craft\\web\\Application->runAction()","#20 /home/ploi/[domain]]/vendor/craftcms/cms/src/web/Application.php(284): craft\\web\\Application->_processActionRequest()","#21 /home/ploi/[domain]]/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()","#22 /home/ploi/[domain]]/web/index.php(12): yii\\base\\Application->run()","#23 {main}"],"memory":10947360,"exception":"[object] (yii\\base\\InvalidArgumentException(code: 0): Invalid numeric value: https://resources.[domain].org/login at /home/ploi/[domain]]/vendor/craftcms/cms/src/helpers/Db.php:605)"} 
2023-10-25 08:11:03 [web.WARNING] [application] Request context: {"userId":3,"sessionId":"ba2vupsdvq593a61n5lgq42mj9","vars":{"_GET":[],"_POST":{"CRAFT_CSRF_TOKEN":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","action":"globals/save-content","setId":"332","siteId":"1","fields":{"footerFormHeading":"Stay Informed","footerFormText":"Subscribe to our newsletter to hear the latest happenings of Becoming Independent.","footerForm":["333"],"footerMenu":[{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":["114"],"id":"estkffqiad","linkSiteId":"1","linkText":""},{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":["1335"],"id":"kahidqcwsr","linkSiteId":"1","linkText":""},{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":["314"],"id":"ytvwykmvqr","linkSiteId":"1","linkText":""},{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":["159"],"id":"sgunckaiom","linkSiteId":"1","linkText":""},{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":["316"],"id":"iwifvosptm","linkSiteId":"1","linkText":""},{"type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","linkValue":"548","id":"tahbzqhqka"},{"linkValue":"2493","linkSiteId":"1","linkText":"","type":"verbb\\hyper\\links\\Entry","handle":"default-verbb-hyper-links-entry","id":"qfgncfcmgn"},{"linkValue":"https://resources.[domain].org/login","linkSiteId":"1","linkText":"Community Resource Guide","type":"verbb\\hyper\\links\\Url","handle":"default-verbb-hyper-links-url","newWindow":"true","id":"tgvpcofkzb"},{"linkValue":"https://resources.[domain].org/login","linkText":"Community Resource Guide"}],"facebook":{"type":"url","value":"https://www.facebook.com/[domain]/"},"instagram":{"type":"url","value":"https://www.instagram.com/[domain]/"},"youtube":{"type":"url","value":"https://www.youtube.com/channel/UClDxakccRmKh-M9nmDno2yw"},"footerAddress":"1455 Corporate Center Pkwy\r\nSanta Rosa, CA 95407","footerPhone":"(707) 524-6600","footerCopyrightText":"All Rights Reserved","footerLogos":{"sortOrder":["339"],"blocks":{"339":{"type":"logo","enabled":"1","fields":{"image":["Over 9 levels deep, aborting normalization"],"linkTo":{"type":"Over 9 levels deep, aborting normalization","value":"Over 9 levels deep, aborting normalization"}}}}}}},"_FILES":[],"_COOKIE":{"1031b8c41dfff97a311a7ac99863bdc5_username":"3728d9629929f1a101a3df37a3b4e262a156402e28b22106bcba4682b728630da:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:31:\"daryl.knight@theengineisred.com\";}","CRAFT_CSRF_TOKEN":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","CraftSessionId":"ba2vupsdvq593a61n5lgq42mj9","1031b8c41dfff97a311a7ac99863bdc5_identity":"698c5d2463f7a0821fe2fc07a5c10399cac4e369ac794f883d39f49f94846e10a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:162:\"[3,\"[\\\"La9vuz_1ePBMkG0-alEtWA3RV2HZ-nvXux7URmS0IRQfsTb-hXEd8IJ5xYvR_fJvXzyeKazL_kpTwj2YlCgK6X9hTCQWsd-Mye3T\\\",null,\\\"e3f8101c41b40572973227d0a64620d0\\\"]\",1209600]\";}"},"_SESSION":{"bd62416aa8538ede709019a5e113eea5__flash":[],"1031b8c41dfff97a311a7ac99863bdc5__token":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__id":3,"__authKey":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__expire":1699431063,"__duration":1209600,"__JSCHK_3331078":"6538cbca902fa4.94302797","__DUP_3331078":"6538cbca929763.65768131","bd62416aa8538ede709019a5e113eea5__auth_access":["editStructure:2","previewDraft:279","saveAssets:33af4157-ab80-44a3-b036-006aac36eacf","previewElement:548","previewDraft:280","previewDraft:282","previewDraft:283","previewDraft:284","previewDraft:285"]},"_SERVER":{"USER":"ploi","HOME":"/home/ploi","HTTP_CF_IPCOUNTRY":"FI","HTTP_CF_CONNECTING_IP":"37.33.116.63","HTTP_CDN_LOOP":"cloudflare","HTTP_PRIORITY":"u=0, i","HTTP_COOKIE":"1031b8c41dfff97a311a7ac99863bdc5_username=3728d9629929f1a101a3df37a3b4e262a156402e28b22106bcba4682b728630da%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A31%3A%22daryl.knight%40theengineisred.com%22%3B%7D; CRAFT_CSRF_TOKEN=830310bb4cebe877376c7afdc55443bd46000ca8cd21714e9121e4a6c238c13ca%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A147%3A%22E8lW4FZfjqqj9Ldiv__kjt1-R6H6X_gPOlARKAgm%7C5ce270360092c9e335db87cb8f2471fe8e69cbc228844c3c23dcd9339c605839E8lW4FZfjqqj9Ldiv__kjt1-R6H6X_gPOlARKAgm%7C3%22%3B%7D; CraftSessionId=ba2vupsdvq593a61n5lgq42mj9; 1031b8c41dfff97a311a7ac99863bdc5_identity=698c5d2463f7a0821fe2fc07a5c10399cac4e369ac794f883d39f49f94846e10a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A162%3A%22%5B3%2C%22%5B%5C%22La9vuz_1ePBMkG0-alEtWA3RV2HZ-nvXux7URmS0IRQfsTb-hXEd8IJ5xYvR_fJvXzyeKazL_kpTwj2YlCgK6X9hTCQWsd-Mye3T%5C%22%2Cnull%2C%5C%22e3f8101c41b40572973227d0a64620d0%5C%22%5D%22%2C1209600%5D%22%3B%7D","HTTP_ACCEPT_LANGUAGE":"en-GB,en;q=0.9,fi;q=0.8,de;q=0.7,nl;q=0.6","HTTP_REFERER":"https://twilight-thunder-plte4evwgo.ploi.online/control/globals/footer","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/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36","HTTP_CONTENT_TYPE":"application/x-www-form-urlencoded","HTTP_UPGRADE_INSECURE_REQUESTS":"1","HTTP_DNT":"1","HTTP_ORIGIN":"https://twilight-thunder-plte4evwgo.ploi.online","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_SEC_CH_UA":"\"Chromium\";v=\"118\", \"Google Chrome\";v=\"118\", \"Not=A?Brand\";v=\"99\"","HTTP_CACHE_CONTROL":"max-age=0","HTTP_CF_VISITOR":"{\"scheme\":\"https\"}","HTTP_X_FORWARDED_PROTO":"https","HTTP_CONTENT_LENGTH":"5854","HTTP_CF_RAY":"81b8fc936bf53769-HEL","HTTP_X_FORWARDED_FOR":"37.33.116.63","HTTP_ACCEPT_ENCODING":"gzip, br","HTTP_CONNECTION":"Keep-Alive","HTTP_HOST":"twilight-thunder-plte4evwgo.ploi.online","REDIRECT_STATUS":"200","SERVER_NAME":"[domain]]","SERVER_PORT":"80","SERVER_ADDR":"209.151.146.16","REMOTE_PORT":"","REMOTE_ADDR":"37.33.116.63","SERVER_SOFTWARE":"nginx/1.18.0","GATEWAY_INTERFACE":"CGI/1.1","REQUEST_SCHEME":"http","SERVER_PROTOCOL":"HTTP/1.1","DOCUMENT_URI":"/index.php","REQUEST_URI":"/control/globals/footer","SCRIPT_NAME":"/index.php","CONTENT_LENGTH":"5854","CONTENT_TYPE":"application/x-www-form-urlencoded","REQUEST_METHOD":"POST","QUERY_STRING":"","DOCUMENT_ROOT":"/home/ploi/[domain]]/web","SCRIPT_FILENAME":"/home/ploi/[domain]]/web/index.php","FCGI_ROLE":"RESPONDER","PHP_SELF":"/index.php","REQUEST_TIME_FLOAT":1698221463.687534,"REQUEST_TIME":1698221463,"CRAFT_ENVIRONMENT":"staging","CRAFT_APP_ID":"CraftCMS--3d2ce621-7eb9-424a-ba6e-a1582f9008fd","CRAFT_SECURITY_KEY":"••••••••••••••••••••••••••••••••","SYSTEM_STATUS":"on","CRAFT_DB_DRIVER":"mysql","CRAFT_DB_SERVER":"127.0.0.1","CRAFT_DB_PORT":"3306","CRAFT_DB_DATABASE":"bi_staging","CRAFT_DB_USER":"bi_staging","CRAFT_DB_PASSWORD":"••••••••••••••••••••","CRAFT_DB_SCHEMA":"","CRAFT_DB_TABLE_PREFIX":"","CP_TRIGGER":"control","PRIMARY_SITE_URL":"https://twilight-thunder-plte4evwgo.ploi.online","BASE_PATH":"/home/ploi/[domain]]/web","PLUGIN_FORMIE":"UNV1Y77RGU2W6X3HF3N9U4LL","PLUGIN_HYPER":"KRRELZUGEJHMNSXJPOQCB5UX","PLUGIN_RETOUR":"0HEP-JHFB-O6IL-EGJ8-GUYP-P1F4","PLUGIN_SEOMATIC":"1DR3PATBS8NORQA3MC6SQPB6","EMAIL_SYSTEM_ADDRESS":"noreply@thebackdropevent.com","EMAIL_SENDER":"Becoming Independent","EMAIL_HOST":"mail.smtp2go.com","EMAIL_PORT":"587","EMAIL_AUTH":"true","EMAIL_ENCRYPTION":"tls","EMAIL_USERNAME":"thebackdropevent","EMAIL_PASSWORD":"••••••••••••••••••••","FORMIE_CAPTCHA_RECAPTCHA":"off","FORMIE_CAPTCHA_HCAPTCHA":"off","FORMIE_CAPTCHA_DUPLICATE":"on","FORMIE_CAPTCHA_HONEYPOT":"on","FORMIE_CAPTCHA_JAVASCRIPT":"on","FORMIE_CONSTANT_CONTACT_KEY":"••••••••••••••••••••••••••••••••••••","FORMIE_CONSTANT_CONTACT_SECRET":"••••••••••••••••••••••","FORMIE_RECAPTCHA_KEY":"••••••••••••••••••••••••••••••••••••••••","FORMIE_RECAPTCHA_SECRET":"••••••••••••••••••••••••••••••••••••••••","FORMIE_SECURITY_KEY":"••••••••••••••••••••••••••••••••"}}} 

Steps to reproduce

  1. Possibly set up a global and use a multi-button hyper field, add several links, save, delete one, save again.

Craft CMS version

4.5.9

Plugin version

dev-craft-4 (since #97)

Multi-site?

No response

Additional context

No response

@darylknight darylknight changed the title Server error on save Deleting a button from a multi-button Hyper field in a global causes a server error Oct 25, 2023
@engram-design
Copy link
Member

Should be fixed in 1.1.16

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