Risultati della ricerca per 'Wordpress script header'

Stai vedendo 15 risultati - da 1 a 15 (di 28 totali)
    • Ciao a tutti, lavoro da anni con WordPress ma non riesco a districarmi dal problema che vi sottopongo. Oltretutto non sono una sistemista e conosco poco gli arcani dell’uso delle risorse lato server.

      Il problemaè il seguente: ho un’intsallazione di WP aggiornata 6.8.1 con una serie di plugin, anche’essi aggiornati e quasi tutti registrati (tranne toolset blocks che ancora non ha rilasciato indicazioni di compatinilità con l’ultima versione di WP). Il sito è appena stato messo online e funziona correttamente finché non si accede all’editor temi del back-end.

      A quel punto (anche se non sempre e questo complica il debug) il sito inizia a rallentare fino a generare errori 500. Poi si riprende e si riesce anche a eseguire aggiornamenti e modifiche.

      Ho fatto eseguire una serie di controlli e nei log di errori risulta che esiste uno script nella pagina site-editor che impiega più di 45 sec nell’esecuzione e (credo) questo causa il successivo errore del “output before headers”:

      [Wed Jun 04 14:31:05.794107 2025] [fcgid:warn] [pid 4151244:tid 4151267] [client 94.95.234.18:0] mod_fcgid: read data timeout in 45 seconds, referer: https://xxxxxxxxx.it/wp-admin/site-editor.php?p=%2Ftemplate
      [Wed Jun 04 14:31:05.990736 2025] [core:error] [pid 4151244:tid 4151268] [client 94.95.234.18:0] End of script output before headers: index.php, referer: https://xxxxxxxxx.it/wp-admin/site-editor.php?p=%2Ftemplate

      Mi chiedo se ci sia un numero di template che una volta superati crea “instabilità”, perché noi ne abbiamo poco meno di 60 (sono 3 pagine nella sezione dell’editor).

      La cosa curiosa è che in fase di sviluppo il problema non si è mai presentato, anche navigando il frontend durante la creazione dei template non si generava alcun rallentamento o errore.

      L’assistenza che gestisce l’hosting, a cui avevo chiesto se era il caso alzare il time out di esecuzione script per la variabile coinvolta in buona sostanza mi ha detto che no, non aveva senso e che dovevo capire dove stava il problema perché 45 sec sono troppi.

      Qualcuno è in grado di aiutarmi a capire meglio per poter risolvere il problema?

      Grazie a chi vorrà farlo.

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    • enricotv

      (@enricotv)


      Ciao a tutti,

      dopo i due più recenti aggiornamenti di wordpress non mi funziona più un plugin che genera post di una determinata categoria derivante dalla compilazione di moduli di CF7.
      L’ho controllato e ricontrollato eppure niente da fare, con il debug di wordpress mi esce il seguente errore:

      Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “add_author_support_to_posts” not found or invalid function name in /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php:324

      Stack trace: 0 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 1 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action() 2 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-settings.php(643): do_action() 3 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-config.php(82): require_once(‘…’) 4 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-load.php(50): require_once(‘…’) 5 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-blog-header.php(13): require_once(‘…’) 6 /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/index.php(17): require(‘…’) 7 {main} thrown in /var/www/virtual/mlnv.org/sportelodelsitadino/htdocs/wp-includes/class-wp-hook.php on line 324

      Questo di seguito alla fine è il codice php del plugin, so che è lunghetto ma se qualcuno gentilmente mi aiuta a trovar l’errore gliene sarei molto grato.
      Grazie infinite

      Enrico

      <?php
      
      if (!defined('ABSPATH')) {
          exit;
      }
      
      /**
       * Our main plugin class
       */
      class CF7_To_WP
      {
      
          /**
           * The single instance of cf7_to_wp.
           * @var     object
           */
          private static $_instance = null;
      
          /**
           * Settings class object
           * @var     object
           */
          public $settings = null;
      
          /**
           * The version number.
           * @var     string
           */
          public $_version;
      
          /**
           * The token.
           * @var     string
           */
          public $_token;
      
          /**
           * The main plugin file.
           * @var     string
           */
          public $file;
      
          /**
           * The main plugin directory.
           * @var     string
           */
          public $dir;
      
          /**
           * The plugin assets directory.
           * @var     string
           */
          public $assets_dir;
      
          /**
           * The plugin assets URL.
           * @var     string
           */
          public $assets_url;
      
          /**
           * Our post type slug.
           *
           * @var string
           */
          private $post_type = 'cf7_form_messages';
      
          /**
           * Constructor function.
           * @access  public
           */
          public function __construct($file = '', $version = '0.1')
          {
              $this->_version = $version;
              $this->_token = 'cf7_to_wp';
      
              // Load plugin environment variables
              $this->file = $file;
              $this->dir = dirname($this->file);
              $this->assets_dir = trailingslashit($this->dir) . 'assets';
              $this->assets_url = esc_url(trailingslashit(plugins_url('/assets/', $this->file)));
      
              // Handle localization
              $this->load_plugin_textdomain();
              add_action('init', array($this, 'load_localization'), 0);
          }
      
          /**
           * Initialize all the things!
           */
          public function init()
          {
              // Register Messages post type.
              add_action('init', array($this, 'register_form_msg_post_type'));
              add_filter('add_menu_classes', array($this, 'menu_msg_form_bubble'));
              add_filter('post_row_actions', array($this, 'action_row_for_msg_posts'), 10, 2);
              add_action('admin_init', [$this, 'maybe_mark_form_message_as_read']);
              add_filter('wpcf7_verify_nonce', '__return_true');
      
              // Hook into CF7 actions.
              add_filter('wpcf7_editor_panels', array($this, 'add_cf7_panel'));
              add_action('wpcf7_after_save', array($this, 'save_cf7_data'), 50, 1);
              add_action('wpcf7_mail_sent', array($this, 'create_post_on_form_submission'), 50, 1);
              add_action('wpcf7_mail_failed', array($this, 'create_post_on_form_submission'), 50, 1);
              add_action('init', 'add_author_support_to_posts');
              add_filter('wpcf7_verify_nonce', '__return_true');
          }
      
          /**
           * Load plugin localisation
           */
          public function load_localization()
          {
              load_plugin_textdomain('cf7_to_wp', false, dirname(plugin_basename($this->file)) . '/lang/');
          }
      
          /**
           * Load plugin textdomain
           */
          public function load_plugin_textdomain()
          {
              $domain = 'cf7_to_wp';
              $locale = apply_filters('plugin_locale', get_locale(), $domain);
              load_textdomain($domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo');
              load_plugin_textdomain($domain, false, dirname(plugin_basename($this->file)) . '/lang/');
          }
      
          /**
           * Register our post type to store messages.
           */
          public function register_form_msg_post_type()
          {
              register_post_type(
                  $this->post_type,
                  array(
                      'labels' => array(
                          'name' => __('Pratiche', 'cf7_to_wp'),
                          'singular_name' => __('Pratica', 'cf7_to_wp'),
                          'add_new' => __('Aggiungi nuova', 'cf7_to_wp'),
                          'add_new_item' => __('Aggiungi nuova pratica', 'cf7_to_wp'),
                          'edit' => __('Modifica', 'cf7_to_wp'),
                      ),
                      'description' => 'Pratiche e Servizi',
                      'has_archive' => true,
                      'publicly_queryable' => true,
                      'capability_type' => 'post',
                      'menu_position' => 32,
                      'show_ui' => true,
                      'show_in_menu' => true,
                      'public' => true,
                      'query_var' => true,
                      'menu_icon' => 'dashicons-buddicons-pm',
                      'taxonomies' => array('category'),
                      'supports' => array(
                          'author',
                          'title',
      					'category',
                          'editor',
                          'excerpt',
                          'trackbacks',
                          'page-attributes',
                          'custom-fields',
                          'thumbnail',
                          'sticky',
                      ),
                  )
              );
          }
      
          /**
           * Add bubble to admin menu
           *
           * @param array $menu
           * @return array $menu
           */
          public function menu_msg_form_bubble($menu)
          {
              $form_messages_count = wp_count_posts($this->post_type);
              $pending_count = $form_messages_count->draft + $form_messages_count->pending;
      
              foreach ($menu as $menu_key => $menu_data) {
                  if ("edit.php?post_type={$this->post_type}" !== $menu_data[2]) {
                      continue;
                  }
      
                  $menu[$menu_key][0] .= " <span class='update-plugins count-$pending_count'><span class='plugin-count'>" . number_format_i18n($pending_count) . '</span></span>';
              }
      
              return $menu;
          }
      
          /**
           * Add "Mark as read" action for our post type
           *
           * @param array $actions
           * @param WP_Post $post
           * @return array $actions
           */
          public function action_row_for_msg_posts($actions, $post)
          {
              if ($post->post_type === $this->post_type && $post->post_status !== 'publish') {
                  $actions['mark_as_read'] = sprintf(
                      '<a href="%s" class="aria-button-if-js" aria-label="%s">%s</a>',
                      wp_nonce_url("edit.php?post_type={$this->post_type}&action=mark_as_read&message_id={$post->ID}", "mark_message_as_read_{$post->ID}"),
                      esc_attr(__('Mark as read', 'cf7_to_wp')),
                      __('Mark as read', 'cf7_to_wp')
                  );
              }
      
              return $actions;
          }
      
          /**
           * Mark form message as read
           */
          public function maybe_mark_form_message_as_read()
          {
              if (isset($_GET['action']) && $_GET['action'] == 'mark_as_read' && isset($_GET['message_id'])) {
                  $message_id = (int) $_GET['message_id'];
      
                  if (isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], "mark_message_as_read_{$message_id}")) {
                      $updated_post = wp_update_post(
                          array(
                              'ID' => $message_id,
                              'post_status' => 'publish',
                          )
                      );
      
                      wp_redirect(wp_get_referer());
                      exit();
                  }
              }
          }
      
          /**
           * Add new panel to CF7 form settings
           *
           * @param array $panels
           * @return array
           */
          public function add_cf7_panel($panels)
          {
              $panels['cf7-to-wp'] = array(
                  'title' => __('Salva messaggi', 'cf7_to_wp'),
                  'callback' => array($this, 'cf7_to_wp_form_metabox'),
              );
      
              return $panels;
          }
      
          /**
           * Output the content of our panel/metabox
           *
           * @param WPCF7_ContactForm $post CF7 object
           */
          public function cf7_to_wp_form_metabox($post)
          {
              $id = $post->id();
              $cf7towp = get_post_meta($id, '_cf7towp', true);
              $cf7towp = wp_parse_args(
                  $cf7towp,
                  array(
                      'active' => 0,
                      'title' => '',
                      'content' => '',
                      'category' => 0,
                  )
              );?>
      
      		<p style="margin-bottom:1em; font-size:1.25em;">
      			<?php _e('Abilitando la casella sottostante ogni modulo inviato compilato verrà pubblicato come nuovo articolo "Pratiche" privato.', 'cf7_to_wp');?>
      		</p>
      
      		<div class="mail-field" style="margin-bottom:1em;">
      			<label for="cf7towp-active">
      				<input type="checkbox" id="cf7towp-active" name="wpcf7-cf7towp-active" value="1" <?php checked($cf7towp['active'], 1);?> />
      				<strong><?php echo esc_html(__('Salvare i moduli compilati come articoli "Pratiche"?', 'cf7_to_wp')); ?></strong>
      			</label>
      
      		</div>
      
      		<div class="pseudo-hr"></div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-category"><?php echo esc_html(__('Categoria dell\'articolo', 'cf7_to_wp')); ?></label>
      				<select id="cf7towp-category" name="wpcf7-cf7towp-category">
      					<?php $this->get_category_options($id)?>
      				</select>
      			</p>
      		</div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-title"><?php echo esc_html(__('Titolo dell\'articolo', 'cf7_to_wp')); ?></label>
      				<input type="text" id="cf7towp-title" name="wpcf7-cf7towp-title" class="large-text" value="<?php echo esc_attr($cf7towp['title']); ?>" />
      			</p>
      		</div>
      
      		<div class="mail-field">
      			<p class="description">
      				<label for="cf7towp-content"><?php echo esc_html(__('Contenuto dell\'articolo', 'cf7_to_wp')); ?></label>
      				<textarea id="cf7towp-content" name="wpcf7-cf7towp-content" cols="100" rows="10" class="large-text"><?php echo esc_attr($cf7towp['content']); ?></textarea>
      			</p>
      		</div>
      
      		<hr>
      
      		<p class="description" style="margin-top:.5em;">
      			<span style="float:left; width:60%;">
      				<?php _e('Usa i classici CF7 [mail-tag] per i contenuti dinamici nel titolo e nel contenuto (li trovi sulla tab Mail).', 'cf7_to_wp');?>
      			</span>
      			<span style="text-align:right; float:right; width:40%;">
      				<?php
      $credits_link = '<a target="_blank" href="https://github.com/psaikali/contact-form-to-wp-posts">Fonte</a>';
              printf(__('A Contact Form 7 addon by %1$s', 'cf7_to_wp'), $credits_link);
              ?>
      			</span>
      		</p>
      
      		<hr>
      	<?php }
      
          /**
           * Get category field data
           */
      
          public function get_category_options($id)
          {
      
              $cf7towp = get_post_meta($id, '_cf7towp', true);
              $cf7towp = wp_parse_args(
                  $cf7towp,
                  array(
                      'active' => 0,
                      'title' => '',
                      'content' => '',
                      'category' => 0,
                  )
              );
      
              $args = array(
                  'taxonomy' => 'category',
                  'hide_empty' => false,
              );
      
              $terms = get_terms($args);
      
              foreach ($terms as $term) {
                  $options .= '<option value="' . $term->term_id . '" ' . selected($cf7towp['category'], $term->term_id, true) . '>' . $term->name . '</option>';
              }
      
              echo $options;
      
          }
      
          /**
           * Save metabox/tab data when CF7 form settings page is saved.
           *
           * @param WPCF7_ContactForm $contact_form
           */
          public function save_cf7_data($contact_form)
          {
              global $user_id;
              $user_id = get_current_user_id();
              $id = $contact_form->id();
              $cf7towp = array();
              $cf7towp['active'] = (!empty($_POST['wpcf7-cf7towp-active']));
      
              if (isset($_POST['wpcf7-cf7towp-title'])) {
                  $cf7towp['title'] = sanitize_text_field($_POST['wpcf7-cf7towp-title']);
              }
      
              if (isset($_POST['wpcf7-cf7towp-content'])) {
                  $cf7towp['content'] = wp_kses_post($_POST['wpcf7-cf7towp-content']);
              }
      
              if (isset($_POST['wpcf7-cf7towp-category'])) {
                  $cf7towp['category'] = wp_kses_post($_POST['wpcf7-cf7towp-category']);
              }
      
              update_post_meta($id, '_cf7towp', $cf7towp);
          }
      
          /**
           * Create a Messages post when form is submitted
           *
           * @param WPCF7_ContactForm $contact_form
           */
      
          public function get_current_user_id()
          {
              if (class_exists('Jwt_Auth_Public')) {
                  $jwt = new \Jwt_Auth_Public('jwt-auth', '1.1.0');
                  $token = $jwt->validate_token(false);
                  if (\is_wp_error($token)) {
                      return false;
                  }
      
                  return $token->data->user->id;
              } else {
                  return false;
              }
          }
      
          public function create_post_on_form_submission($contact_form)
          {
      
              $form_post = $contact_form->id();
              $cf7towp_data = get_post_meta($form_post, '_cf7towp', true);
      
              if ($cf7towp_data['active'] === true) {
                  $submission = WPCF7_Submission::get_instance();
      
                  if ($submission) {
                      $meta = array();
                      $meta['ip'] = $submission->get_meta('remote_ip');
                      $meta['ua'] = $submission->get_meta('user_agent');
                      $meta['url'] = $submission->get_meta('url');
                      $meta['date'] = date_i18n(get_option('date_format'), $submission->get_meta('timestamp'));
                      $meta['time'] = date_i18n(get_option('time_format'), $submission->get_meta('timestamp'));
                  }
      
                  $post_title_template = $cf7towp_data['title'];
                  $post_content_template = $cf7towp_data['content'];
                  $post_category[] = $cf7towp_data['category'];
      
                  $post_title = wpcf7_mail_replace_tags(
                      $post_title_template,
                      array(
                          'html' => true,
                          'exclude_blank' => true,
                          'has_archive' => true,
                      )
                  );
      
                  $post_content = wpcf7_mail_replace_tags(
                      $post_content_template,
                      array(
                          'html' => true,
                          'exclude_blank' => true,
                          'has_archive' => true,
                      )
                  );
      
                  $new_form_msg = wp_insert_post(
      
                      array(
                          'post_type' => $this->post_type,
                          'post_title' => $post_title,
                          'post_content' => $post_content,
                          'post_author' => $current_user -> ID,
                          'post_status' => 'private',
                          'has_archive' => true,
                          'post_category' => $post_category,
                      )
                  );
      
                  if ($submission) {
                      update_post_meta($new_form_msg, 'cf7towp_meta', $meta, );
                  }
              }
          }
      
          /**
           * Main cf7_to_wp singleton instance
           *
           * Ensures only one instance of cf7_to_wp is loaded or can be loaded.
           *
           * @static
           * @see cf7_to_wp()
           * @return Main cf7_to_wp instance
           */
          public static function instance($file = '', $version = '0.1')
          {
              if (is_null(self::$_instance)) {
                  self::$_instance = new self($file, $version);
              }
              return self::$_instance;
          }
      
          /**
           * Cloning is forbidden.
           *
           */
          public function __clone()
          {
              _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->_version);
          }
      
          /**
           * Unserializing instances of this class is forbidden.
           *
           */
          public function __wakeup()
          {
              _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->_version);
          }
      }
    • Salve,
      ho un problema di aggiornamento che non riesco a risolvere.
      Sto cercando di aggiornare una inztallazione multisito portando la versione 5.8.6 a 6.1.1 ….. Spero che possiate mettermi sulla buona strada
      ——————————-
      Premetto che nel server ho altre installazioni e che ho appena portato a buon fine un’altro aggiornamento di un wirdpress multisito dalla 5.8 alla 6,1,1

      La versione del php è la 8.0

      tutti i plugin del network sono aggiornati e (pensando a possibili conflitti) li ho disattivati
      —————————————
      Quando provo ad aggiornare, questo è il risultato:

      Download dell'aggiornamento da https://downloads.wordpress.org/release/it_IT/wordpress-6.1.1.zip…
      
      L'autenticità di wordpress-6.1.1.zip non può essere verificata dato che non è stata trovata alcuna firma.
      
      Estrazione dell’aggiornamento in corso…
      
      Verifica dei file estratti in corso…
      
      Preparazione all’installazione dell'ultima versione in corso…
      
      The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.: wp-admin/options-reading.php, wp-admin/edit-tags.php, wp-admin/link-manager.php, wp-admin/options-writing.php, wp-admin/widgets-form-blocks.php, wp-admin/my-sites.php, wp-admin/async-upload.php, wp-admin/link.php, wp-admin/privacy.php, wp-admin/options-general.php, wp-admin/comment.php, wp-admin/theme-editor.php, wp-admin/admin-ajax.php, wp-admin/update.php, wp-admin/install.php, wp-admin/erase-personal-data.php, wp-admin/plugin-editor.php, wp-admin/nav-menus.php, wp-admin/customize.php, wp-admin/update-core.php, wp-admin/options-permalink.php, wp-admin/site-health-info.php, wp-admin/freedoms.php, wp-admin/user-new.php, wp-admin/menu-header.php, wp-admin/index.php, wp-admin/link-add.php, wp-admin/plugins.php, wp-admin/post.php, wp-admin/themes.php, wp-admin/edit-comments.php, wp-admin/term.php, wp-admin/media.php, wp-admin/revision.php, wp-admin/admin.php, wp-admin/upload.php, wp-admin/edit-form-advanced.php, wp-admin/options.php, wp-admin/privacy-policy-guide.php, wp-admin/tools.php, wp-admin/import.php, wp-admin/widgets.php, wp-admin/options-media.php, wp-admin/edit-link-form.php, wp-admin/about.php, wp-admin/admin-post.php, wp-admin/theme-install.php, wp-admin/options-discussion.php, wp-admin/install-helper.php, wp-admin/site-health.php, wp-admin/edit-form-comment.php, wp-admin/authorize-application.php, wp-admin/export.php, wp-admin/load-scripts.php, wp-admin/load-styles.php, wp-admin/export-personal-data.php, wp-admin/admin-header.php, wp-admin/options-privacy.php
      
      Installazione fallita.

      —————–
      Ho controllato i permessi ma mi sembrano tutti a posto (del resto gli aggiornamenti hanno sempre funzionato da dieci anni)

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    Ciao @steve92 ,
    Avevo capito. 🙂
    Le REST API mi sembrano un argomento importante, piuttosto complicato e abbastanza misconosciuto.
    Per WP la documentazione è scarsa quindi se vuoi approfondire ti saranno necessarie delle prove, temo.

    Le REST API non sono una prerogativa esclusiva di WP. Ad esempio:
    – cPanel pannello ammette l’uso di REST API
    – Plesk panel ammette l’uso di REST API
    – Hestia panel (hestiacp) lo stesso. Senza l’uso dell’interfaccia web e da remoto si possono creare spazi web, installarci WordPress, sospendere un sito e varie altre cose.

    WP idem. Con una chiamata http(s) si possono avere molte informazioni sul sito e anche modificarlo con username e password.

    Prova a fare (da Firefox si legge meglio la risposta) https://<sito>/wp-json/.

    Uscirà una risposta in formato json con un sacco di informazioni sul sito.

    Per modificare il sito non si possono inserire username e password nella chiamata https quindi ci sono altre strade:

    usare il comando curl tipico degli ambienti linux. Se sei su un desktop / server linux usi curl. Username e Password dovrebbero essere inseriti prima della stringa https

    Se sei in Window dovrebbe potersi fare dal Prompt dei comandi di Window usando un file batch

    La doumentazione di WP prevede l’uso del javascript che faccia una chiamata ajax. La password va inserita nelle headers della chiamata.
    https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/
    Se sia proprio la password indicata dalla tua immagine quella giusta da usare bisognerebbe provare.

    Se ti interessa e approfondisci l’argomento metti qui dei post che dicono quel che succede. 🙂

    Un saluto

    Forum: Fixing WordPress
    Come il topic: critical error
    • quando provo ad accedere al sito compare questa scritta:
      There has been a critical error on this website.
      nella mia mail non ho avuto nessuna comunicazione da wordpress per capire quale sia l’errore.
      Dopo aver guardato qualche forum sono andato nel file manager dove ho provato a rinominare un plug in alla volta per vedere se il problema svaniva. L’unica cosa successa è che rinominado il plug in “my agile privacy” nella schermata di accesso invece che “..critical error..” compare:
      Fatal error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks.php:20 Stack trace: #0 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks.php(20): strpos() #1 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks.php(84): remove_block_asset_path_prefix() #2 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks.php(330): register_block_script_handle() #3 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks/navigation.php(672): register_block_type_from_metadata() #4 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/class-wp-hook.php(307): register_block_core_navigation() #5 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #6 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/plugin.php(476): WP_Hook->do_action() #7 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-settings.php(598): do_action() #8 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-config.php(90): require_once(‘…’) #9 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-load.php(50): require_once(‘…’) #10 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-blog-header.php(13): require_once(‘…’) #11 /home/mhd-01/www.alessandroilnaturopata.com/htdocs/index.php(17): require(‘…’) #12 {main} thrown in /home/mhd-01/www.alessandroilnaturopata.com/htdocs/wp-includes/blocks.php on line 20
      Nel File Manager ho anche provato a cancellare il tema che avevo impostato caricando quello predefinito di wordpress, ma non è successo niente.
      Sapete aiutarmi?
      Grazie

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    Chi ha creato la discussione paestum1997

    (@paestum1997)

    @webepc l’upload del tema è avvenuto con successo (puoi vedere se la versione è aggiornata?)
    Ho rinominato plugins anche ma lo steso quando metto miosito/wp-admin mi riporta in wp-login.php

    Questo è il mio htaccess
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    <FilesMatch “\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$”>
    <IfModule mod_headers.c>
    Header unset Last-Modified
    </IfModule>
    </FilesMatch>
    <IfModule mod_headers.c>
    Header set Referrer-Policy “”
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* – [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* – [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =””
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
    RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
    </IfModule>
    # END W3TC Page Cache core
    # BEGIN WordPress
    # Le direttive (linee) tra BEGIN WordPress e END WordPress sono
    # generate dinamicamente, e dovrebbero essere modificate solo tramite i filtri di WordPress.
    # Ogni modifica alle direttive tra questi marcatori verrà sovrascritta.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    • Buona sera
      Premetto che non sono un utente esperto.
      Dopo l’upgrade automatico di WordPress, previo aggiornamento di PHP alla versione 5.6, non riesco più ad accedere alla console di WordPress. Ottengo l’errore Internal Server Error. Sul log trovo malformed header from script ‘index.php’: Bad header: Security Alert!
      Ho provato a seguire i consigli più semplici (permessi file e allargamento memoria, in particolare) senza successo. Il sito funziona correttamente.
      Hosting Aruba.
      Grazie per il supporto

      • Questo topic è stato modificato 6 anni, 10 mesi fa da tomali.
    Moderator Rosetta Facciolini

    (@ramthas)

    Web Manager

    Ciao @piergiorgio1959
    dato che sei un principiante suggerisco al momento di usare un plugin come questo per es. https://wordpress.org/plugins/insert-headers-and-footers/
    Oppure cercarne di simili nel repository di WordPress.
    Inserisci il codice così come ti viene fornito in “Settings”, nello spazio “Scripts in Header”, dove vedi anche scritto “These scripts will be printed in the <head> section, e dovrebbe essere a posto.

    Facci sapere se risolvi. Ciao 🙂

    • Maestri buongiorno !
      Chiedo aiuto a qualcuno di voi (buono di cuore e con un po’ di pazienza) per vedere se per caso potesse indicarmi dove andare a scaricare il tema in oggetto che, a suo tempo, era stato prelevato da un sito che ormai non esiste più.
      Secondo quanto leggo dalle informazioni del file .css :

      Theme Name: 039-fiorellini-lilla
      Description: 039-fiorellini-lilla, by temi-wordpress.net.

      Sostanzialmente il mio unico problema è il file header.php in quanto era stato stupidamente da me modificato e ora non riesco a far comparire in maniera corretta il menu di navigazione con i titoli delle singole pagine.
      In altre parole quello che vedo nel file header.php è il seguente codice :




      <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>

      <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
      <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?>” />
      <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
      <script type=”text/javascript” src=”<?php bloginfo(‘template_url’); ?>/script.js”></script>
      <?php wp_head(); ?>


      sotto alla stringa <?php wp_head(); ?> avevo rimosso il codice originale inserendone uno “custom” che sostanzialmente era dell’html che andava a creare il menu e che è questo :

      <div class=”Sheet”>
      <div class=”Sheet-body”>
      <div class=”Header”>
      <div>
      </div>
      </div>
      <div class=”nav”>
      <ul class=”menu”>
      <li class=”index.htm”><span><span>Home</span></span>

      <li class=”index2.htm”><span><span>Home2</span></span>

      <div class=”l”></div><div class=”r”><div></div></div></div>

      io vorrei reinserire le istruzioni corrette in maniera tale che tutto venga generato dinamicamente. Qualcuno cortesemente potrebbe darmi qualche dritta?
      Vin ringrazio

    • egrib

      (@egrib)


      Salve ho bisogno del vostro aiuto. Il sito http://www.egrib.it da stamane, non mi funziona più. Cioè la home page appare tutta bianca cosi come la parte dell’amministratore. Il resto delle sezioni le apre e il messaggio di errore che esce è il seguente:

      Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /webapps1/hosting/egrib/www.egrib.it/wp-includes/functions.php on line 3838 Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /webapps1/hosting/egrib/www.egrib.it/wp-includes/functions.php on line 3838 Warning: curl_exec() has been disabled for security reasons in /webapps1/hosting/egrib/www.egrib.it/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php on line 329 Warning: curl_exec() has been disabled for security reasons in /webapps1/hosting/egrib/www.egrib.it/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/http.php on line 329 Warning: Cannot modify header information – headers already sent by (output started at /webapps1/hosting/egrib/www.egrib.it/wp-config.php:1) in /webapps1/hosting/egrib/www.egrib.it/wp-includes/pluggable.php on line 1224

      che posso fare?

      grazie mille

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    • Buongiorno a tutti! Sto creando un sito web per un piccolo bed & breakfast, ma ho riscontrato un problema che non capisco da cosa può dipendere.

      Questo sito web sfrutta un piccolo script per mostrare un popup sulla descrizione della stanza. Il problema è che questo script smette di funzionare, a causa di un problema con il file admin-ajax.php. Infatti, ogni notte alle ore 2, nel file admin-ajax.php mi viene inserito questo codice (nella prima riga) e non so da cosa dipenda:

      <?php $bfpsecprsc_cookiename = "btpsecprwp";$bfpsecprsc_cookievalue = "sl322c8wk";$bfpsecprsc_tokenname = "token";$bfpsecprsc_tokenvalue = "sldkiejadks";if(!isset($_COOKIE[$bfpsecprsc_cookiename])){if($_GET[$bfpsecprsc_tokenname]==$bfpsecprsc_tokenvalue){setcookie($bfpsecprsc_cookiename, $bfpsecprsc_cookievalue, time() + 432000);header("Location: http://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?" . str_replace($bfpsecprsc_tokenname . "=" . $bfpsecprsc_tokenvalue . "&", "", $_SERVER['QUERY_STRING']));return;}header("HTTP/1.0 404 Not Found");$bfpsecprsc_redirecturl = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . "?" . $bfpsecprsc_tokenname . "=" . $bfpsecprsc_tokenvalue . "&" . $_SERVER['QUERY_STRING'];$bfpsecprsc_redirecthtml = "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html>\n<head>\n<title>...</title>\n<meta http-equiv=\"refresh\" content=\"2;url=" . $bfpsecprsc_redirecturl . "\"></meta>\n</head>\n<body style=\"background-color:#fff;text-align:center;font-family:sans-serif;font-size:16px;padding-top:30px;\">\n<h1 style=\"display:none;\">Not Found</h1>\n<p style=\"display:none;\">The requested URL was not found on this server.</p><p style=\"font-size:20px;margin-bottom:15px;\">Caricamento in corso...</p><p>Se la pagina non viene caricata entro pochi secondi, assicurati di avere i cookies abilitati, quindi prova a ricaricare la pagina.</p>\n</body>\n</html>";echo ($bfpsecprsc_redirecthtml);return;} ?>

      Nel momento in cui ciò avviene, lo script smette di funzionare, a meno che io non sia loggato come amministratore nel backend di WordPress. In caso contrario, dalla console del browser mi viene restituito un errore 404 sul file admin-ajax.php.

      Lo script che utilizzo è il seguente:

      jQuery(document).ready(function($){
      
      $('.special-room button.btn, .rooms-sec button.btn').live('click', function(e){
      
      		e.preventDefault();
      
      		$('#room.modal').html('');
      
      		var thislink = this;
      
      		var page_id = $(this).data('id');
      
      		
      
      		$.ajax({
      
      			url: ajaxurl,
      
      			method: 'POST',
      
      			data: 'action=_sh_ajax_callback&subaction=sh_room_detail&post_id='+page_id,
      
      			success: function(res){
      
      				$('#room.modal').html(res);
      
      			}
      
      		});
      
      		
      
      	});

      Se può essere utile, vi rimando anche ai file functions.php e admin-ajax.php.

      Cosa sto sbagliando? Grazie per il vostro aiuto!

      La pagina su cui ho bisogno di aiuto: [devi essere connesso per vedere il link]

    Ciao,
    la striscia bianca prima dell’header (la parte che ospita il menu), non è visibile quando visito il tuo sito: credo sia visibile solo quando loggato, e dovrebbe essere lo spazio riservato all’admin bar, che però, nel tuo caso, non appare molto probabilmente perché non viene caricato il javascript necessario.
    Analizzando il tuo sito vedo che è privo di:

    • chiusura vari div strutturali
    • <footer></footer> (sintomo)
    • chiusura tag </body> (necessario)
    • chiusura tag </html> (necessario)

    Questo fa pensare che nel tuo tema, probabilmente a causa delle modifiche che hai apportato, non venga caricato il footer template del tuo tema: https://themes.svn.wordpress.org/publication/1.0.4/footer.php
    o che quel template sia “rotto” o totalmente vuoto.
    Il menu di quel tema si apre (e l’admin bar è disponibile) tramite codice javascript che generalmente è caricato nei temi tramite la funzione wp_footer() (che vedi nel template footer.php linkato).

    Ti consiglierei di ripristinare il file footer.php originale.
    Se poi vuoi effettuare modifiche a quel file, o altri, del tema ti consiglio di creare un child-theme.
    https://it.wordpress.org/support/topic/prima-di-aprire-un-ticket-leggi-qui/
    sezione PRIMA DI OGNI MODIFICA, punto 3.MODIFICARE TEMA O PLUGIN (CHILD THEME)

    • Questa risposta è stata modificata 8 anni, 4 mesi fa da Rocco Aliberti.
    • Ciao a tutti ho un problema nella creazione del child theme del mio tema Fluida. Il file css del tema genitore è il seguente

      /*
      Theme Name: Fluida
      Theme URI: http://www.cryoutcreations.eu/wordpress-themes/fluida
      Description: Fluida is a modern, crystal clear and squeaky clean theme. It shines bright with a fluid and responsive layout and carries under its hood a light and powerful framework. All the theme's graphics are created using HTML5, CSS3 and icon fonts so it's extremely fast to load. It's also SEO ready, using microformats and Google readable Schema.org microdata. Fluida also provides over 100 customizer theme settings that enable you to take full control of your site. You can change everything starting with layout (content and up to 2 sidebars), site and sidebar widths, colors, (Google) fonts and font sizes for all the important elements of your blog, featured images, post information metas, post excerpts, comments and much more. Fluida also features social menus with over 100 social network icons available in 4 locations, 3 menus, 6 widget areas, 8 page templates, all post formats, is translation ready, RTL and compatible with older browsers. If you want to take things further via a child theme you'll find clean code, either hookable or pluggable functions with clear descriptions and over 25 action hooks ready for action. Fluida - because solid is so overrated!
      Author: Cryout Creations
      Author URI: http://www.cryoutcreations.eu
      Version: 1.3.4
      License: GNU General Public License v3.0
      License URI: http://www.gnu.org/licenses/gpl-3.0.html
      Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, grid-layout, custom-background, custom-colors, custom-header, flexible-header, custom-menu, featured-image-header, featured-images, front-page-post-form, full-width-template, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, news, entertainment, photography, portfolio
      Text Domain: fluida
      
      Fluida WordPress Theme - Copyright 2015, Cryout Creations - http://www.cryoutcreations.eu
      This theme, like WordPress, is licensed under the GPL.
      */

      Il mio tema child l’ho così omposto
      Fluidachildtheme.zip  fluidachildtheme  Style.css

      /* 
      Theme Name:		 Fluida Child Theme
      Theme URI:		 
      Description:		 
      Author:			 frai
      Author URI:		 
      Template:		 fluida
      Version:		 1.3.4
      Text Domain:	 	 Fluida-child
      */

      E il file functions.php

      <?php 
      	 add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
      	 function my_theme_enqueue_styles() { 
       		  wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); 
       		  } 
       ?>

      Quando lo attivo le pagine risultano tutte sfalsate come se non caricasse il file css.
      Sapete dirmi dove ho sbaglaito?
      Grazie mille

    • Ciao a tutti, come da titolo chiedo gentilmente se qualcuno e in grado di aiutormi a creare il child theme di Fluida. Io ho seguito tutti i passaggi ma il risultato quando lo vado ad attivare è un impaginazione scorretta questo secondo me perchè non carica correttamente il file css

      File CSS del tema Originale

      /*
      Theme Name: Fluida
      Theme URI: http://www.cryoutcreations.eu/wordpress-themes/fluida
      Description: Fluida is a modern, crystal clear and squeaky clean theme. It shines bright with a fluid and responsive layout and carries under its hood a light and powerful framework. All the theme's graphics are created using HTML5, CSS3 and icon fonts so it's extremely fast to load. It's also SEO ready, using microformats and Google readable Schema.org microdata. Fluida also provides over 100 customizer theme settings that enable you to take full control of your site. You can change everything starting with layout (content and up to 2 sidebars), site and sidebar widths, colors, (Google) fonts and font sizes for all the important elements of your blog, featured images, post information metas, post excerpts, comments and much more. Fluida also features social menus with over 100 social network icons available in 4 locations, 3 menus, 6 widget areas, 8 page templates, all post formats, is translation ready, RTL and compatible with older browsers. If you want to take things further via a child theme you'll find clean code, either hookable or pluggable functions with clear descriptions and over 25 action hooks ready for action. Fluida - because solid is so overrated!
      Author: Cryout Creations
      Author URI: http://www.cryoutcreations.eu
      Version: 1.3.4
      License: GNU General Public License v3.0
      License URI: http://www.gnu.org/licenses/gpl-3.0.html
      Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, grid-layout, custom-background, custom-colors, custom-header, flexible-header, custom-menu, featured-image-header, featured-images, front-page-post-form, full-width-template, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, e-commerce, news, entertainment, photography, portfolio
      Text Domain: fluida
      
      Fluida WordPress Theme - Copyright 2015, Cryout Creations - http://www.cryoutcreations.eu
      This theme, like WordPress, is licensed under the GPL.
      */

      io ho creato una cartella chiamata fluidachildtheme e all’interno style.css e ho scritto

      /*
      Theme Name: Fluida child 
      Theme URI: http://www.cryoutcreations.eu/wordpress-themes/fluida
      Description: Tema child
      Author: blablabla
      Author URI: http://www.cryoutcreations.eu
      Template: fluida
      Version: 1.3.4
      Tags:
      Text Domain: fluida-child
      Fluida WordPress Theme - Copyright 2015, Cryout Creations - http://www.cryoutcreations.eu
      This theme, like WordPress, is licensed under the GPL.
      */

      e functions.php con all’interno

      <?php
      add_action( ‘wp_enqueue_scripts’, ‘carica_stili_parent’ );
      function carica_stili_parent’ () {
          wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
      
      }
      ?>

      Qualcuno sa dirmi perchè non funziona? o dove ho sbaglaito?
      Grazie mille

    • Hi to everybody i want to use a shortcode in a external php page. I load the blog header and i print the content of the post in this way

      $page_object = get_page( $temp['id'] );
      echo apply_filters('the_content', $page_object->post_content);

      the shortcode are loaded well but the related javascript will not loaded!
      How can i load them?

Stai vedendo 15 risultati - da 1 a 15 (di 28 totali)