Skip Navigation

[Résolu] Error with layouts

This support ticket is created Il y a 6 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Marqué : 

This topic contains 4 réponses, has 3 voix.

Last updated by Beda Il y a 6 années et 2 mois.

Assisted by: Nigel.

Auteur
Publications
#600939

I noticed a bug in the layouts class.

wpddl.layouts-templates-settings.class.php
LINE 80: list( $type, $my_class ) = explode( '|', $context );

But in my particular case, there is an issue
Notice: Undefined offset: 1 in /wp-content/plugins/layouts/classes-auto/wpddl.layouts-templates-settings.class.php on line 80

Because you need to place your
if ( ! $context ) { return null; }

above your LIST, in my opinion.

What you have:
// Get type {post types, taxonomies, wordpress archives slugs, 404} and class {page, archive}
list( $type, $my_class ) = explode( '|', $context );

$menu_title = $toolsetAdminBar->get_title( 'layouts', true, $type, $my_class, null );
$post_id = null;

if ( ! $context ) {
return null;
}

it SHOULD be:
if ( ! $context ) {
return null;
}

// Get type {post types, taxonomies, wordpress archives slugs, 404} and class {page, archive}
list( $type, $my_class ) = explode( '|', $context );

$menu_title = $toolsetAdminBar->get_title( 'layouts', true, $type, $my_class, null );
$post_id = null;

#601060

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Hi Justin

Your suggestion makes sense to me, but I've passed it to my colleagues for comment and I'll get back to you with their response.

#601168

Great thanks!

#606698

Nigel
Supporter

Languages: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01:00)

Hi Justin

The developers reviewed this and made changes based on your comments.

It will be included in the next version of Layouts, but in the meantime if you need to you can apply the fix by unzipping the archive available here hidden link and replacing the same file in the /classes-auto/ directory of the Layouts plugin.

Thanks again for your feedback.

#611853
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.