-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Election Page Error - The website encountered an unexpected error. Please try again later #11
Comments
G'day Trev! What version of PHP? |
PHP 8.2
Trevor Forrest
Chief Executive Officer
eMail: ***@***.***
Phone: 876-408-4398
Web: https://www.876solutions.com
Get BlueMail for Android
…On Sep 2, 2023, 3:39 PM, at 3:39 PM, Justin Freeman ***@***.***> wrote:
G'day Trev! What version of PHP?
--
Reply to this email directly or view it on GitHub:
#11 (comment)
You are receiving this because you authored the thread.
Message ID:
***@***.***>
----------------------------------------------------------------------------------------------------------------------
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of 876 Solutions.
If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone.
Please contact the sender if you believe you have received this email in error.
876 Solutions
|
Hello following up on this issue. Is there a solution for this error Justin? |
Want to roll this out for a client and urgently need some help as it relates to this |
We haven't tested this on PHP 8.2 or Drupal 9.x. So I am not surprised it is not working. We have tested this on PHP 8.0 and WordPress - so I'd recommend using that environment. Which matches the environment that the client who currently sponsors this project uses. |
Unfortunately Wordpress is not an option for this or any of our clients we are a Drupal shop. There was little to no indication that this product only worked with wordpress, is there any way that updates can be made for it to work with drupal? everything seems to work all the way up to the generation of a page for the election voting etc. |
@trevorforrest876 FYI I have this working on Drupal 10.x with PHP 8.1 with the changes from #13 |
Ok great......How do we get the updated version of this? |
@trevorforrest876 You'll need to wait for it to be merged into the codebase, or use the code from the PR but your mileage may vary. |
@trevorforrest876 I've put together a version that fixes this issue based on the work by @nickperkins in the branch CIVIELECT-53. In my testing with newer PHP versions that show the issue you report, this new branch fixes the issue. Can you advise if it works for you? |
Fixed in 1.2.4 |
Hello,
I am running Drupal 9.5.10
with CIVICRM version 5.64.0
Elections: Version 1.2.3
After the Election has been created and the page becomes visible the following error is seen on the page:
Test Election
This Election is currently in the Nominations phase.
You can submit nominations for this Election using the button below, and see existing nominations for each position. If you have been nominated for any positions, you can see these and have the option of withdrawing them. Nominations that require one or persons to second them will also be marked as such – press the "Need second" button to add your nominations
Nominations will close on September 4th, 2023 12:00 PM (GMT+00:00)
Existing Nominations
Nominations for President
The website encountered an unexpected error. Please try again later.
On viewing the Drupal logs the following error is seen in the logs:
Location https://example.com.com/civicrm/elections/view?eid=2
Referrer https://example.com.com/civicrm/elections
Message TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in include() (line 29 of /var/www/vhosts/example.com/private/civicrm/templates_c/en_US/%%63/633/6330B7D7%%nominations.tpl.php)
#0 /var/www/vhosts/example.com/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1914): include()
#1 /var/www/vhosts/example.com/private/civicrm/templates_c/en_US/%%AB/ABE/ABE5D1F1%%ViewElection.tpl.php(44): Smarty->_smarty_include()
#2 /var/www/vhosts/example.com/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1914): include('...')
#3 /var/www/vhosts/example.com/private/civicrm/templates_c/en_US/%%F7/F77/F77C7890%%CMSPrint.tpl.php(67): Smarty->_smarty_include()
#4 /var/www/vhosts/example.com/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1914): include('...')
#5 /var/www/vhosts/example.com/private/civicrm/templates_c/en_US/%%2B/2BD/2BD99720%%drupal8.tpl.php(6): Smarty->_smarty_include()
#6 /var/www/vhosts/example.com/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1273): include('...')
#7 /var/www/vhosts/example.com/vendor/civicrm/civicrm-core/CRM/Core/Smarty.php(205): Smarty->fetch()
#8 /var/www/vhosts/example.com/vendor/civicrm/civicrm-core/CRM/Core/Page.php(261): CRM_Core_Smarty->fetch()
#9 /var/www/vhosts/example.com/sites/default/files/civicrm/ext/au.com.agileware.elections/CRM/Elections/Page/Base.php(47): CRM_Core_Page->run()
#10 /var/www/vhosts/example.com/sites/default/files/civicrm/ext/au.com.agileware.elections/CRM/Elections/Page/ViewElection.php(66): CRM_Elections_Page_Base->run()
#11 /var/www/vhosts/example.com/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(319): CRM_Elections_Page_ViewElection->run()
#12 /var/www/vhosts/example.com/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#13 /var/www/vhosts/example.com/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#14 /var/www/vhosts/example.com/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke()
#15 /var/www/vhosts/example.com/modules/contrib/civicrm/src/Controller/CivicrmController.php(83): Drupal\civicrm\Civicrm->invoke()
#16 [internal function]: Drupal\civicrm\Controller\CivicrmController->main()
#17 /var/www/vhosts/example.com/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#18 /var/www/vhosts/example.com/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()
#19 /var/www/vhosts/example.com/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#20 /var/www/vhosts/example.com/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#21 /var/www/vhosts/example.com/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()
#22 /var/www/vhosts/example.com/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#23 /var/www/vhosts/example.com/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#24 /var/www/vhosts/example.com/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#25 /var/www/vhosts/example.com/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#26 /var/www/vhosts/example.com/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#27 /var/www/vhosts/example.com/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#28 /var/www/vhosts/example.com/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#29 /var/www/vhosts/example.com/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#30 /var/www/vhosts/example.com/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#31 /var/www/vhosts/example.com/index.php(19): Drupal\Core\DrupalKernel->handle()
#32 {main}
The text was updated successfully, but these errors were encountered: