• To date, I’ve built several child themes in WP, based on Twentyseventeen (my favorite parent theme because I know it well).
    My themes are all very developed and advanced: they’re all based on page templates, taxonomies, and custom post_types, all based on custom metaboxes (there are no standard pages).
    On one of these sites, however, (and only one), I’ve run into a problem I can’t solve:
    When I log into wp-admin post-php, tab supports active “slug” metabox, it works normally, but when I exit the page, the slug checkbox is unchecked again and the metabox disappears.
    It resets itself.
    For now, I’ve had to fix the problem manually, forcing #sluddiv to display:block in CSS, and adding .checked to the checkbox in jQuery, but obviously, this is only a temporary workaround (!).
    This usually happens due to plugin incompatibilities, but I use very few (maximum 5) and I’ve tested by disabling them.
    Or it happens due to accidentally duplicated slugs, but the SQL query tells me there are no duplicate slugs.
    I’ve already wasted a couple of evenings on this, and I’m wondering if anyone has any suggestions: there’s definitely a conflict, but where?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mauro Vicariotto

    (@mrosfy)

    Zero support as of now.

    Anyhow I found the bug, and if this informationa can be useful,

    the issue starts from Polylang at

    ../wp-content/plugins/polylang/admin/admin-base.php, line 325:

    if ( 'undefined' === typeof options.data || '' === options.data.trim() ) { // ...

    I installed jQuery 4, and trim() is deprecated.

    console-log for this error: Uncaught TypeError: options.data.trim is not a function

    I confirm that this causes the reset of slug metabox, in fact when you activate it with checkbox in page support panel, the console-log shows the error, while if you activate it via css ( #slugdiv {display: block} ) and trigger checked via jQuery ( $( '#slugdiv-hide' ).prop( 'checked', true ) ) the console-log doesn’t show errors.

    Thread Starter Mauro Vicariotto

    (@mrosfy)

    updading Polylang solved

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.