Ответы в темах

Просмотр 15 ответов — с 16 по 30 (всего 47)
  • перепробовал штук 10 плагинов так и не нашел ни одного рабочего. Единственный, который именно передает параметры — этот, хоть и выскакивает нотис. Всем спасибо, буду искать исполнителя

    в теме этого плагина уже пару лет нет ответов автора… думаю он забросил

    при замене$_product->ID
    на $_product->get_id()

    ошибка нотис не пропадает, а добавляется еще и фатальная ошибка
    atal error: Uncaught Error: Call to undefined method WP_Post::get_id() in /home/m/mypower/second_mypower/public_html/wp-content/plugins/woo-dynamic-re-marketing/remarketing-dinamic.php:38

    проверял, если убрать (предполагаемый мной кусок кода в первом посте) совсем, то ошибок нет, но данные в гугл не передаются. В этой ветке форума не сможете помочь и нужно пересоздать тему в ветке вкуомерса?

    • Ответ изменён 5 лет, 2 месяца назад пользователем mypowerlogo.

    что такое git?

    а как тогда найти того, кому можно доверять?)

    определил, плагин выдававший ошибку. при помощи «Query Monitor»
    вопрос исчерпан спасибо.

    да точно. спасибо.
    а ошибка вот.
    Notice: wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in ,,,,/wp-includes/functions.php on line 4161

    строка вот

    /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message */
    trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
    • Ответ изменён 5 лет, 5 месяцев назад пользователем mypowerlogo.

    в общем заменил
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return ' . absint( get_theme_mod( 'archive_number_products', 24 ) ) . ';' ), 20 );
    вот этим

    add_filter( 'loop_shop_per_page', function($cols){ 
    						 	$cols = absint( get_theme_mod( 'archive_number_products', 24 ) );
    							return $cols;
    						 }, 20 );

    удалил плагин «jQuery Vertical Mega Menu»

    и теперь в файле debug.log
    PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in ,,,,,,,/wp-includes/class-wp-hook.php on line 286

    что это еще может быть?

    плагин «jQuery Vertical Mega Menu», деактивирую.

    а вот эту ошибку как исправить?
    PHP Deprecated: Function create_function() is deprecated in ,,,,,,/wp-content/themes/giga-store/functions.php on line 326

    functions.php
    326 add_filter( 'loop_shop_per_page', create_function( '$cols', 'return ' . absint( get_theme_mod( 'archive_number_products', 24 ) ) . ';' ), 20 );

    • Ответ изменён 5 лет, 5 месяцев назад пользователем mypowerlogo.

    как их лечить?

    итак в файле debug.log появилось появились новые ошибки:
    например вот список ошибок за 1 секунду:

    [02-Nov-2018 15:33:32 UTC] PHP Notice:  wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in ,,,,,/wp-includes/functions.php on line 4161
    [02-Nov-2018 15:33:32 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in ,,,,,/wp-includes/functions.php on line 4161
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Function create_function() is deprecated in ,,,,,,/wp-content/themes/giga-store/functions.php on line 326
    [02-Nov-2018 15:33:32 UTC] PHP Notice:  Вызванный метод конструктора класса WP_Widget в dc_jqverticalmegamenu_widget считается <strong>устаревшим</strong> с версии 4.3.0! Используйте <pre>__construct()</pre>. in ,,,,,,/wp-includes/functions.php on line 3916
    [02-Nov-2018 15:33:32 UTC] PHP Notice:  Вызванный метод конструктора класса WP_Widget в dc_jqverticalmegamenu_widget считается <strong>устаревшим</strong> с версии 4.3.0! Используйте <pre>__construct()</pre>. in ,,,,,,,/wp-includes/functions.php on line 3916
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::header() should not be called statically in ,,,,,,,,/wp-includes/class-wp-hook.php on line 286
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::get_plugin_directory() should not be called statically in ,,,,,,,,,,/wp-content/plugins/jquery-vertical-mega-menu/dcwp_jquery_vertical_mega_menu.php on line 30
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::get_plugin_directory() should not be called statically in ,,,,,,/wp-content/plugins/jquery-vertical-mega-menu/dcwp_jquery_vertical_mega_menu.php on line 34
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::get_plugin_directory() should not be called statically in ,,,,,,,,,,,,/wp-content/plugins/jquery-vertical-mega-menu/dcwp_jquery_vertical_mega_menu.php on line 35
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::get_plugin_directory() should not be called statically in ,,,,,,,,/wp-content/plugins/jquery-vertical-mega-menu/dcwp_jquery_vertical_mega_menu_widget.php on line 205
    [02-Nov-2018 15:33:32 UTC] PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in ,,,,,,/wp-includes/class-wp-hook.php on line 286
    [02-Nov-2018 15:33:32 UTC] PHP Deprecated:  Non-static method dc_jqverticalmegamenu::footer() should not be called statically in ,,,,,,/wp-includes/class-wp-hook.php on line 286
    [02-Nov-2018 15:33:32 UTC] PHP Notice:  Функция get_product с версии 3.0 <strong>считается устаревшей</strong>! Используйте wc_get_product. in ,,,,,,,/wp-includes/functions.php on line 3853

    в файле functions.php всего 398 строк:
    326 add_filter( 'loop_shop_per_page', create_function( '$cols', 'return ' . absint( get_theme_mod( 'archive_number_products', 24 ) ) . ';' ), 20 );

    dcwp_jquery_vertical_mega_menu.php

    29	function header(){
    		echo "\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"".dc_jqverticalmegamenu::get_plugin_directory()."/css/dcverticalmegamenu.css\" media=\"screen\" />";
    		
    		// Scripts
    33			wp_enqueue_script( 'jquery' );
    34			wp_enqueue_script( 'jqueryhoverintent', dc_jqverticalmegamenu::get_plugin_directory() . '/js/jquery.hoverIntent.minified.js', array('jquery') );
    35			wp_enqueue_script( 'dcjqverticalmegamenu', dc_jqverticalmegamenu::get_plugin_directory() . '/js/jquery.dcverticalmegamenu.1.3.js', array('jquery') );
    			
    	}
    

    dcwp_jquery_vertical_mega_menu_widget.php

    204 if($skin != 'No-theme'){
    205						echo "\n\t<link rel=\"stylesheet\" href=\"".dc_jqverticalmegamenu::get_plugin_directory()."/skin.php?widget_id=".$key."&skin=".strtolower($skin)."\" type=\"text/css\" media=\"screen\"  />";
    206					}
    • Ответ изменён 5 лет, 5 месяцев назад пользователем mypowerlogo.
    • Ответ изменён 5 лет, 5 месяцев назад пользователем mypowerlogo.

    Если в лог ошибок не пишется страница, то можно в access.log попробовать найти запрос с тем же временем и тем же IP, что и в строке с ошибкой.

    включил запись логов, логи пишутся раз в сутки. как появится файл с логами отпишусь

    • Ответ изменён 5 лет, 5 месяцев назад пользователем mypowerlogo.

    причина по которой начал выискивать ошибки и нестыковки на сайте — отсутствие заказов вукомерс. если это ошибка то подскажите как ее устранить?

    просмотрел: PHP errors и Hooks & Actions
    искал: add_action( и call_user_func_array(
    не нашел

    или может есть какой то плагин, который в режиме реального времени будет показывать на какой страничке сработал Warning: call_user_func_array()?

    может при помощи плагина «Query Monitor»как то можно найти причину ошибки Warning: call_user_func_array() ?он много информации дает вроде

Просмотр 15 ответов — с 16 по 30 (всего 47)