Can no longer edit/see carousel in admin dashboard 24/8/2011 at 21:51
Today I logged into my WordPress Dashboard to continue creating our website. When I tried to edit our carousel which displays on the home page, I could only see the box that contains they types of content you can drag into your carousel. Under this section was the following error:
Fatal error: Call to undefined function is_array() in /home1/windommn/public_html/wp-content/plugins/wp-carousel/wp-carousel.php on line 2844
I have not made any changes to the plug-in files since yesterday, so I’m confused as to why there would be an error like this today.
I noticed that an update was available for the carousel plugin so I installed it and uploaded our theme/skin again. The carousel continues to display on the home page without error, but in the admin dashboard, I still cannot edit it and I still see the above error.
What can I do to get rid of this error so that I can once again edit my carousel?
I’ve even tried creating a new carousel – it adds/creates a new one, but I can’t edit it and see the same error as mentioned above.
When I look at the code in wp-carousel.php at line 2844 I don’t see any errors: Here’s line 2844:
$extra)
{
?>
Any advice on how to correct or get rid of this error would be greatly appreciated as I cannot edit any of my carousels currently.
Thanks
Reply To: Can no longer edit/see carousel in admin dashboard 25/8/2011 at 7:48
This is the first time I hear about that error.
Try the following. First, open wp-carousel.php and go to line 2844. You’ll find this:
<?php
if ($_SESSION['WP_CAROUSEL_EXTRAS'] || is_array($_SESSION['WP_CAROUSEL_EXTRAS'])):
foreach ($_SESSION['WP_CAROUSEL_EXTRAS'] as $key => $extra)
{
?>
Replace that code with this:
<?php
if (is_array($_SESSION['WP_CAROUSEL_EXTRAS'])):
foreach ($_SESSION['WP_CAROUSEL_EXTRAS'] as $key => $extra)
{
?>
I’m not sure, but it might fix the problem.
If that doesn’t fix the problem, and you don’t use the Extras, you can manually reset the Extras array to force WP Carousel to skip line 2844. Just go to line 2843 and replace the code:
<?
With:
<?php $_SESSION['WP_CAROUSEL_EXTRAS'] = false;
You won’t be able to use Extras, but it may solve the problem.
Reply To: Can no longer edit/see carousel in admin dashboard 25/8/2011 at 15:28
After changing the code as you suggested, I can now see the carousel content in the admin dashboard. Just below that is the section where I should see all of the themes – it doesn’t show any of the themes that are installed – just a box that says “Are you looking for more themes…”. Under that is the section labeled “Standard Options”. Inside of this box is now the warning “Warning: Invalid argument supplied for foreach() in /home1/windommn/public_html/wp-content/plugins/wp-carousel/wp-carousel.php on line 5132″. If I click on the link “Current theme options”, it says “This theme does not support custom settings”.
The section of code at line 5132 is:
$s_value)
{
if ($s_key == ‘arrows’)
{
?>
Are there changes that need to be made to custom themes for this new version of wp-carousel? If so, please explain.
And please let me know what I need to do in order to make the themes appear in the dashboard and what I need to do to the above code in order to get rid of the warning message.
Thanks
Reply To: Can no longer edit/see carousel in admin dashboard 25/8/2011 at 15:32
For some reason, the code I tried to paste in the above message didn’t all appear, so I’ll try again. This is the code at line 5132:
foreach ($current_theme['supports'] as $s_key => $s_value)
{
if ($s_key == ‘arrows’)
{
?>
Reply To: Can no longer edit/see carousel in admin dashboard 30/8/2011 at 15:55
For some reason I wasn’t suscribed to this thread. I’ve view your response right now.
I suggest you reading the docs. They explain how to create both Themes and Extras. There are some changes needed to make themes compatible with the new version, but any theme compatible with WP Carousel 0.5.x should workd with 1.x. Some features won’t work, like videos or jCarousel, but the main functions should work.
And about your problem, I think there might be an error with themes that doesn’t set key supports in their info array.
To fix it try this. Open wp-carousel.php, go to line 665. You’ll find something like this:
foreach ($wp_carousel_default_supported_supportable_features as $key => $value)
{
if (!isset($theme['supports'][$value]))
{
$theme['supports'][$value] = true;
}
}
foreach ($wp_carousel_default_unsupported_supportable_features as $key => $value)
{
if (!isset($theme['supports'][$value]))
{
$theme['supports'][$value] = false;
}
}
Replace it with:
if (!isset($theme['supports']))
{
$theme['supports'] = array();
}
foreach ($wp_carousel_default_supported_supportable_features as $key => $value)
{
if (!isset($theme['supports'][$value]))
{
$theme['supports'][$value] = true;
}
}
foreach ($wp_carousel_default_unsupported_supportable_features as $key => $value)
{
if (!isset($theme['supports'][$value]))
{
$theme['supports'][$value] = false;
}
}
It should fix the problem by adding an empty array as supported-features-array. Then WP Carousel will look for supportable-features that are not specified as supported and set them as unsupported.
Reply To: Can no longer edit/see carousel in admin dashboard 1/9/2011 at 6:52
I’ll mark this topic as solved and close it.
This topic has been closed to new replies.