• Resolved Nico

    (@nico87)


    Hello Community,
    when I want to edit my start page (with Elementor) the following errors appear:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function sync_category_tag_slugs(), 1 passed in /homepages/33/d410915534/htdocs/kunden/jfb/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /homepages/33/d410915534/htdocs/kunden/jfb/wp-admin/includes/ms.php:552 Stack trace: #0 /homepages/33/d410915534/htdocs/kunden/jfb/wp-includes/class-wp-hook.php(292): sync_category_tag_slugs('St. Paulus Stif...') #1 /homepages/33/d410915534/htdocs/kunden/jfb/wp-includes/plugin.php(212): WP_Hook->apply_filters('St. Paulus Stif...', Array) #2 /homepages/33/d410915534/htdocs/kunden/jfb/wp-content/plugins/insert-php-code-snippet/widget.php(64) : eval()'d code(5): apply_filters('get_term', 'St. Paulus Stif...') #3 /homepages/33/d410915534/htdocs/kunden/jfb/wp-content/plugins/insert-php-code-snippet/widget.php(64): eval() #4 /homepages/33/d410915534/htdocs/kunden/jfb/wp-content/plugins/elementor/includes/widgets/wordpress.php(271): Xyz_Insert_Php_Widget->widget(Array, Array) #5 /homepages/33/d410915534/htdocs/ in /homepages/33/d410915534/htdocs/kunden/jfb/wp-admin/includes/ms.php on line 552

    This error only appeared after I converted this WordPress installation to a multisite.

    If I deactivate the plugin (Insert PHP Code Snippet), everything works without any problems

    Does anyone have any ideas or help?

    Best wishes,
    Nico`

    • This topic was modified 3 years, 6 months ago by Nico.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Nico

    (@nico87)

    Found the PHP that caused the error. Some ideas?

    <?php
    	$subcategories = get_categories('&child_of=3&hide_empty');
    	echo '<ul class="subcategorielisting">';
    	foreach ($subcategories as $subcategory) {
    	  echo sprintf('<li><a href="%s" title="%s">%s</a></li>', get_category_link($subcategory->term_id), apply_filters('get_term', $subcategory->name), apply_filters('get_term', $subcategory->name));
    	}
    	echo '</ul>';
    ?>
    Thread Starter Nico

    (@nico87)

    Ok, it was my fault:

    <?php
    	$args = array('child_of' => 3, 'hide_empty' => false,);
    	$categories = get_categories( $args );
    	echo '<ul class="subcategorielisting">' . "\n";
    	foreach($categories as $category) { 
    		echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>';
    		echo $category->name;
    		echo '</a></li>';  
    	}
    	echo '</ul>' . "\n";
    ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t edit the start page where two pieces of PHP are included’ is closed to new replies.