• Resolved alantygel2

    (@alantygel2)


    Hi,

    I use mainwp dashboard in several websites, but a few of them are broken after the latest updates.

    Particularly, I’m getting the following error when saving a Post:

    {“code”:”internal_server_error”,”message”:”
    H\u00e1 um erro cr\u00edtico no seu site.<\/p>
    Saiba mais sobre a como resolver problemas do WordPress.<\/a><\/p>”,”data”:{“status”:500,”error”:{“type”:1,”message”:”Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in \/home\/socialor\/public_html\/wp-content\/plugins\/mainwp-child\/modules\/changes-logs\/classes\/class-changes-handle-wp-content.php:128\nStack trace:\n#0 \/home\/socialor\/public_html\/wp-content\/plugins\/mainwp-child\/modules\/changes-logs\/classes\/class-changes-handle-wp-content.php(128): in_array()\n#1 \/home\/socialor\/public_html\/wp-includes\/class-wp-hook.php(341): MainWP\Child\Changes\Changes_Handle_WP_Content::change_before_post_edit_data()\n#2 \/home\/socialor\/public_html\/wp-includes\/class-wp-hook.php(365): WP_Hook->apply_filters()\n#3 \/home\/socialor\/public_html\/wp-includes\/plugin.php(522): WP_Hook->do_action()\n#4 \/home\/socialor\/public_html\/wp-includes\/post.php(4901): do_action()\n#5 \/home\/socialor\/public_html\/wp-includes\/post.php(5296): wp_insert_post()\n#6 \/home\/socialor\/public_html\/wp-includes\/rest-api\/endpoints\/class-wp-rest-posts-controller.php(977): wp_update_post()\n#7 \/home\/socialor\/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->update_item()\n#8 \/home\/socialor\/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request()\n#9 \/home\/socialor\/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(439): WP_REST_Server->dispatch()\n#10 \/home\/socialor\/public_html\/wp-includes\/rest-api.php(467): WP_REST_Server->serve_request()\n#11 \/home\/socialor\/public_html\/wp-includes\/class-wp-hook.php(341): rest_api_loaded()\n#12 \/home\/socialor\/public_html\/wp-includes\/class-wp-hook.php(365): WP_Hook->apply_filters()\n#13 \/home\/socialor\/public_html\/wp-includes\/plugin.php(570): WP_Hook->do_action()\n#14 \/home\/socialor\/public_html\/wp-includes\/class-wp.php(418): do_action_ref_array()\n#15 \/home\/socialor\/public_html\/wp-includes\/class-wp.php(821): WP->parse_request()\n#16 \/home\/socialor\/public_html\/wp-includes\/functions.php(1343): WP->main()\n#17 \/home\/socialor\/public_html\/wp-blog-header.php(16): wp()\n#18 \/home\/socialor\/public_html\/index.php(17): require(‘\/home\/socialor\/…’)\n#19 {main}\n thrown”,”file”:”\/home\/socialor\/public_html\/wp-content\/plugins\/mainwp-child\/modules\/changes-logs\/classes\/class-changes-handle-wp-content.php”,”line”:128}},”additional_errors”:[]}

    I’m using the latest version of WordPress and Php8.3.

    MainWP Report:

    Configuração do servidor Valor obrigatório Valor Status

    MAINWP CHILD
    MainWP Child Versão 6.0.2 6.0.2 Pass
    WordPress
    WordPress Version >=3.4 6.9.2 Pass
    WordPress Memory Limit >=64M 40M Warning
    MultiSite Disabled =true true Pass
    Método FileSystem = direct direct Pass
    CONFIGURAÇÕES DO PHP
    PHP Version >=7.4 8.4.18 Pass
    Modo de segurança do PHP desativado OFF
    PHP Max Execution Time >=30 seconds 300 Pass
    PHP Max Input Time >=30 seconds 180 Pass
    PHP Memory Limit >=128M (256M+ best for big backups) 1G Pass
    PCRE Backtracking Limit >=10000 4194304 Pass
    PHP Upload Max Filesize >=2M (2MB+ best for upload of big plugins) 1G Pass
    PHP Post Max Size >=2M (2MB+ best for upload of big plugins) 1G Pass
    SSL Extension Enabled =true true Pass
    SSL Warnings = empty Pass
    cURL Extension Enabled =true true Pass
    cURL Timeout >=300 seconds 60 Warning
    cURL Version >=7.18.1 8.14.1 Pass
    cURL SSL Version >=OpenSSL/1.1.0 OpenSSL/1.1.1wPass
    OpenSSL Working Status Yes Yes Pass
    CONFIGURAÇÕES DO MySQL
    MySQL Version >=5.0 10.11.16-MariaDB-cll-lvePass
    INFORMAÇÕES DO ARQUIVO DE BACKUP
    ZipArchive enabled in PHP =true true Pass
    Tar GZip supported =true true Pass
    Tar BZip2 supported =true true Pass
    INFORMAÇÕES DO SERVIDOR
    Diretório raiz do WordPress /home/socialor/public_html/
    Nome do Servidor social.org.br
    Software do Servidor LiteSpeed
    Sistema Operacional Linux
    Arquitetura 64 bit
    IP do Servidor 177.73.233.52
    Protocolo do Servidor HTTP/1.1
    Servidor HTTP social.org.br
    HTTPS Ligado – on
    Conexão automática do servidor Corpo da resposta HTTP não esperado:
    Agente de usuário Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:148.0) Gecko/20100101 Firefox/148.0
    Porta do servidor 443
    Interface de Gateway
    Uso de memória 14.31 MB
    URL Completa https://social.org.br/wp-admin/plugins.php?plugin_status=all&paged=1&s
    Request Time 1773166931
    Aceitar Conteúdo text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
    Conteúdo Accept-Charset N/D
    Atualmente executando o caminho do roteiro /home/socialor/public_html/wp-admin/options-general.php
    URL da página atual /wp-admin/options-general.php?page=mainwp_child_tab
    Endereço Remoto 201.148.188.227
    Servidor Remoto N/A
    Porta Remota 39727
    INFORMAÇÕES SOBRE PHP
    PHP permite URL fopen Ligado
    PHP: Suporte a Exif SIM ( V8.4.)
    PHP: Suporte a IPTC SIM
    PHP: Suporte a XML SIM
    Funções Desabilitadas PHP dl, escapeshellarg, escapeshellcmd, exec, expect_popen, passthru, pcntl_exec, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setegid, posix_seteuid, posix_setgid, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_close, proc_open, shell_exec, show_source, system,
    Extensões PHP Carregadas Core, PDO, PDO_ODBC, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, ionCube Loader, json, ldap, libxml, litespeed, mbstring, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, random, readline, session, shmop, snmp, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, timezonedb, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib
    INFORMAÇÃO DO MySQL
    Modo do MySQL ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Codificação do Cliente MySQL utf8
    PLUGINS do WordPress
    Advanced Custom Fields 6.7.1 Ativo
    Akismet Anti-spam: Spam Protection 5.6 Ativo
    Blocksy Companion (Premium) 2.1.34 Ativo
    Getwid 2.1.3 Ativo
    MainWP Child 6.0.2 Ativo
    Post Types Order 2.4.3 Ativo
    Query Monitor 3.20.2 Inativo
    UpdraftPlus – Backup/Restore 1.26.2 Ativo
    W3 Total Cache 2.9.2 Ativo
    WP Mail SMTP 4.7.1 Ativo
    Yoast SEO 27.1.1 Ativo Próxima data Cronograma Gancho

    10 de março de 2026 15:08 Every minute action_scheduler_run_queue
    10 de março de 2026 15:21 [W3TC] Page Cache file GC (every 3600 seconds) w3_pgcache_cleanup
    10 de março de 2026 15:40 A cada hora wp_privacy_delete_old_export_files
    10 de março de 2026 18:34 Uma vez por dia updraft_backup
    10 de março de 2026 18:34 Uma vez por dia updraft_backup_database
    10 de março de 2026 21:07 Duas vezes por dia updraftplus_clean_temporary_files
    10 de março de 2026 22:41 Duas vezes por dia wp_update_user_counts
    10 de março de 2026 22:48 Uma vez por dia fs_data_sync_blocksy-companion
    11 de março de 2026 00:10 Duas vezes por dia wp_update_plugins
    11 de março de 2026 00:40 Duas vezes por dia wp_update_themes
    11 de março de 2026 06:52 Uma vez por dia wpseo-reindex
    11 de março de 2026 06:52 Uma vez por dia wpseo_permalink_structure_check
    11 de março de 2026 06:52 Uma vez por dia wpseo_detect_default_seo_data
    11 de março de 2026 10:40 Uma vez por dia recovery_mode_clean_expired_keys
    11 de março de 2026 10:41 Uma vez por dia wp_scheduled_delete
    11 de março de 2026 10:41 Uma vez por dia delete_expired_transients
    11 de março de 2026 10:41 Uma vez por dia wp_scheduled_auto_draft_delete
    12 de março de 2026 10:59 Duas vezes por dia wp_version_check
    16 de março de 2026 10:41 Uma vez por semana wp_delete_temp_updater_backups
    17 de março de 2026 07:02 Uma vez por semana acf_update_site_health_data
    17 de março de 2026 10:40 Uma vez por semana wp_site_health_scheduled_check Tempo Erro

                                   thrown in /home/socialor/public_html/wp-content/plugins/mainwp-child/modules/changes-logs/classes/class-changes-handle-wp-content.php on line 128
                                   #8 {main}                                              
                                   #7 /home/socialor/public_html/wp-admin/revision.php(71): wp_restore_post_revision()
                                   #6 /home/socialor/public_html/wp-includes/revision.php(486): wp_update_post()
                                   #5 /home/socialor/public_html/wp-includes/post.php(5296): wp_insert_post()
                                   #4 /home/socialor/public_html/wp-includes/post.php(4901): do_action()
                                   #3 /home/socialor/public_html/wp-includes/plugin.php(522): WP_Hook->do_action()
                                   #2 /home/socialor/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
                                   #1 /home/socialor/public_html/wp-includes/class-wp-hook.php(341): MainWP\Child\Changes\Changes_Handle_WP_Content::change_before_post_edit_data()

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Bojan Katusic

    (@bojankatusic)

    Hey @alantygel2

    I was unable to reproduce this issue when saving a post on Child Sites. And we haven’t received other reports for this, so it appears to be an isolated issue.

    Please open a private Help Desk ticket and we will gladly look into this: https://mainwp.com/my-account/get-support/

    Thread Starter alantygel2

    (@alantygel2)

    I solved the issue.

    The websites were I has having this issue were sites migrated from Joomla, with a lot of sticky posts. In order to clear these sticky posts, I just cleared the wp_options “sticky_posts” entry.

    MainWP Child was expecting this to be an array, and thats why the error raised.

    In short:

    • Disable MainWP Child
    • Set a post as sticky post
    • Unset the post as sticky
    • Activate MainWP Child

    Then the entry will again be recovered as an array.

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

You must be logged in to reply to this topic.