fooplugins / foogallery

The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
http://fooplugins.com/foogallery
GNU General Public License v2.0
110 stars 45 forks source link

warning array_merge() : argument 2 is not an array in post.php line 3592 #87

Closed HansSchultz closed 1 year ago

HansSchultz commented 8 years ago

Newest update of foogallery (v 1.2.13) gives the warning: warning array_merge() : argument 2 is not an array in /public_html/wp-includes/post.php line 3592

3591 // Merge old and new fields with new fields overwriting old ones.

3592 $postarr = array_merge($post, $postarr);

when making changes and to element in medialibrary and upon submitting the changes.

Changes unsuccessful! By changing line 3592 to:

3592 $postarr = array_merge((array) $post, (array) $postarr);

the error does not occur, but the changes take no effect!

bradvin commented 8 years ago

hey - thanks for posting this, but I cannot reproduce. What version of PHP? Also, how exactly are you editing the attachment? From the gallery edit page?

bradvin commented 8 years ago

also what version of WP?

HansSchultz commented 8 years ago

Hey, the WP version is 4.5.3–da_DK**, which should be the newest available with danish language.

The php version is 5.6.24.

Here is more detailed info:

Server API: LiteSpeed V6.9

PHP API 20131106 PHP Extension 20131226 Zend Extension 220131226 Zend Extension Build API220131226,NTS PHP Extension Build API20131226,NTS Debug Build no Thread Safety disabled Zend Signal Handling disabled Zend Memory Manager enabled Zend Multibyte Support provided by mbstring IPv6 Support enabled DTrace Support disabled Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2 Registered Stream Filters zlib., bzip2., convert.iconv., mcrypt., mdecrypt._, string.rot13, string.toupper, string.tolower, string.striptags, convert., consumed, dechunk

It is a pdf document that i open/edit the repective page for from the media list, change the title f.eks. and submit it.

On 09-08-2016 16:00, bradvin wrote:

hey - thanks for posting this, but I cannot reproduce. What version of PHP? Also, how exactly are you editing the attachment? From the gallery edit page?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fooplugins/foogallery/issues/87#issuecomment-238561956, or mute the thread https://github.com/notifications/unsubscribe-auth/AT9W1CPAtTpny-KyfCuzdpiNme30XhL5ks5qeIgTgaJpZM4JgE2T.

bradvin commented 8 years ago

please post the output from FooGallery -> System Info I think this might be a plugin conflict, and that is why I cannot reproduce it.

HansSchultz commented 8 years ago

FooGallery version : 1.2.13 WordPress version : 4.5.3 Activated Theme : Bulan WordPress URL : http://aarhus-koncertkor.dk PHP version : 5.6.24 PHP GD Loaded : 2 Extensions Endpoint : https://raw.githubusercontent.com/fooplugins/foogallery-extensions/master/extensions.json Extensions Errors : Nope, all good Extensions : Extensions Active : Array ( [0] => default_templates )

Gallery Templates : Array ( [0] => default [1] => image-viewer [2] => justified [3] => masonry [4] => simple_portfolio [5] => thumbnail )

Lightboxes : Array ( )

Settings : Array ( )

Active Plugins : Array ( [0] => advanced-responsive-video-embedder/advanced-responsive-video-embedder.php [1] => ckeditor-for-wordpress/ckeditor_wordpress.php [2] => foobox-image-lightbox/foobox-free.php [3] => foogallery/foogallery.php [4] => imagemagick-engine/imagemagick-engine.php [5] => media-library-assistant/index.php [6] => menu-image/menu-image.php [7] => tt-sidebar-login-widget/tt-sidebar-login.php [8] => wordpress-importer/wordpress-importer.php )

bradvin commented 8 years ago

Thanks! I see you have a plugin named Media Library Assistant. I will install that to see if there is a conflict

HansSchultz commented 8 years ago

I tried disabling the MLA but it had no effect. Can it be some DB type mismatches that has occured from the use of this plugin?

HansSchultz commented 8 years ago

I have also been trying out 'WP Media Category Management' plugin, but it is disabled for some time.

HansSchultz commented 8 years ago

BTW, as i remember i have been using Foo Gallery since before the latest update and did not have this problem before, so i think it came since the latest update.

HansSchultz commented 8 years ago

Is 1.2.11 or 1.2.12 downloadable from somewhere, so i can check with them and update when the problem is resolved?

bradvin commented 8 years ago

https://wordpress.org/plugins/wp-rollback/ is the best solution I have found to rollback to a previous version of a plugin

bradvin commented 8 years ago

In MLA - did you setup any custom fields or mappings? Can you export your MLA settings and share?

HansSchultz commented 8 years ago

Here is the full output of the error, might help...

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/aarhus-koncertkor.dk/public_html/wp-includes/post.php on line 3592

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/aarhus-koncertkor.dk/public_html/wp-includes/post.php on line 3592

Warning: Cannot modify header information - headers already sent by (output started at /var/www/aarhus-koncertkor.dk/public_html/wp-includes/post.php:3592) in /var/www/aarhus-koncertkor.dk/public_html/wp-includes/pluggable.php on line 1167

HansSchultz commented 8 years ago

On 09-08-2016 17:38, bradvin wrote:

In MLA - did you setup any custom fields or mappings? Can you export your MLA settings and share?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fooplugins/foogallery/issues/87#issuecomment-238593718, or mute the thread https://github.com/notifications/unsubscribe-auth/AT9W1GkM4ft9TSQhYz5Nlv9OKz3-v5lhks5qeJ8PgaJpZM4JgE2T.

Here are my mla settings...

a:13:{s:23:"image_default_link_type";s:4:"none";s:15:"current_version";s:4:"2.31";s:17:"gallery_in_tuning";s:7:"dynamic";s:21:"mla_gallery_in_tuning";s:7:"dynamic";s:16:"taxonomy_support";a:6:{s:11:"tax_support";a:1:{s:19:"attachment_category";s:7:"checked";}s:14:"tax_quick_edit";a:1:{s:19:"attachment_category";s:7:"checked";}s:15:"tax_term_search";a:1:{s:19:"attachment_category";s:7:"checked";}s:18:"tax_flat_checklist";a:0:{}s:18:"tax_checked_on_top";a:1:{s:19:"attachment_category";s:7:"checked";}s:10:"tax_filter";s:19:"attachment_category";}s:28:"search_media_filter_defaults";a:2:{s:16:"search_connector";s:3:"AND";s:13:"search_fields";a:2:{i:0;s:5:"title";i:1;s:7:"content";}}s:19:"mla_gallery_columns";s:1:"1";s:15:"style_templates";a:1:{s:11:"list-custom";s:484:"";}s:16:"markup_templates";a:1:{s:11:"list-custom";a:6:{s:9:"arguments";s:0:"";s:4:"open";s:97:"<div class="entry-content" itemprop="text" id='[+selector+]' gallery-size-[+size_class+]'>

";}}s:20:"custom_field_mapping";a:0:{}s:17:"iptc_exif_mapping";a:3:{s:8:"standard";a:5:{s:10:"post_title";a:5:{s:4:"name";s:5:"Title";s:10:"iptc_value";s:4:"none";s:10:"exif_value";s:0:"";s:10:"iptc_first";b:1;s:13:"keep_existing";b:1;}s:9:"post_name";a:5:{s:4:"name";s:9:"Name/Slug";s:10:"iptc_value";s:4:"none";s:10:"exif_value";s:0:"";s:10:"iptc_first";b:1;s:13:"keep_existing";b:1;}s:9:"image_alt";a:5:{s:4:"name";s:8:"ALT Text";s:10:"iptc_value";s:4:"none";s:10:"exif_value";s:0:"";s:10:"iptc_first";b:1;s:13:"keep_existing";b:1;}s:12:"post_excerpt";a:5:{s:4:"name";s:7:"Caption";s:10:"iptc_value";s:4:"none";s:10:"exif_value";s:0:"";s:10:"iptc_first";b:1;s:13:"keep_existing";b:1;}s:12:"post_content";a:5:{s:4:"name";s:11:"Description";s:10:"iptc_value";s:4:"none";s:10:"exif_value";s:0:"";s:10:"iptc_first";b:1;s:13:"keep_existing";b:1;}}s:8:"taxonomy";a:0:{}s:6:"custom";a:0:{}}s:15:"post_mime_types";a:0:{}s:12:"upload_mimes";a:4:{s:6:"custom";a:0:{}s:8:"disabled";a:53:{s:3:"aac";b:1;s:3:"ac3";b:1;s:2:"ai";b:1;s:3:"aif";b:1;s:4:"aifc";b:1;s:4:"aiff";b:1;s:2:"au";b:1;s:3:"bin";b:1;s:3:"cat";b:1;s:3:"cdf";b:1;s:3:"cgm";b:1;s:3:"clp";b:1;s:3:"crd";b:1;s:3:"dat";b:1;s:3:"dll";b:1;s:3:"dot";b:1;s:3:"dtd";b:1;s:3:"eps";b:1;s:4:"gtar";b:1;s:3:"ief";b:1;s:3:"ifb";b:1;s:3:"m13";b:1;s:3:"m14";b:1;s:3:"mml";b:1;s:3:"mny";b:1;s:5:"movie";b:1;s:3:"mp2";b:1;s:3:"mpa";b:1;s:3:"msg";b:1;s:3:"mvb";b:1;s:3:"otf";b:1;s:3:"pic";b:1;s:4:"pict";b:1;s:2:"ps";b:1;s:3:"pub";b:1;s:3:"rgb";b:1;s:3:"scd";b:1;s:3:"snd";b:1;s:3:"sql";b:1;s:3:"sst";b:1;s:3:"stl";b:1;s:3:"svg";b:1;s:3:"trm";b:1;s:3:"ttf";b:1;s:3:"w6w";b:1;s:3:"wmf";b:1;s:4:"woff";b:1;s:4:"word";b:1;s:3:"xlc";b:1;s:3:"xlm";b:1;s:3:"xml";b:1;s:3:"xsl";b:1;s:4:"xslt";b:1;}s:11:"description";a:0:{}s:9:"icon_type";a:82:{s:2:"ai";s:10:"postscript";s:4:"aifc";s:5:"audio";s:3:"asx";s:5:"video";s:2:"au";s:5:"audio";s:3:"bin";s:6:"binary";s:1:"c";s:8:"source_c";s:2:"cc";s:10:"source_cpp";s:3:"cgm";s:5:"image";s:5:"class";s:11:"source_java";s:3:"clp";s:6:"knotes";s:3:"crd";s:6:"knotes";s:3:"css";s:10:"stylesheet";s:3:"dat";s:6:"binary";s:3:"dll";s:8:"exe_wine";s:3:"dot";s:8:"document";s:4:"dotx";s:8:"document";s:3:"dtd";s:4:"code";s:3:"eps";s:10:"postscript";s:3:"exe";s:8:"exe_wine";s:4:"gtar";s:7:"archive";s:4:"gzip";s:7:"archive";s:1:"h";s:8:"source_h";s:3:"ics";s:8:"calendar";s:3:"ief";s:5:"image";s:3:"ifb";s:8:"calendar";s:2:"js";s:11:"source_java";s:3:"mdb";s:8:"database";s:3:"mid";s:5:"audio";s:4:"midi";s:5:"audio";s:3:"mml";s:8:"kformula";s:5:"movie";s:5:"video";s:3:"mpa";s:5:"audio";s:3:"mpe";s:5:"video";s:3:"msg";s:7:"message";s:3:"odb";s:8:"database";s:3:"odc";s:3:"log";s:3:"odf";s:8:"kformula";s:3:"odg";s:2:"3d";s:6:"onepkg";s:6:"knotes";s:6:"onetmp";s:6:"knotes";s:6:"onetoc";s:6:"knotes";s:7:"onetoc2";s:6:"knotes";s:3:"otf";s:4:"font";s:3:"pdf";s:3:"pdf";s:3:"pic";s:5:"image";s:4:"pict";s:5:"image";s:3:"pot";s:11:"interactive";s:4:"potm";s:11:"interactive";s:4:"potx";s:11:"interactive";s:4:"ppam";s:11:"interactive";s:2:"ps";s:10:"postscript";s:3:"psd";s:5:"image";s:3:"pub";s:8:"document";s:2:"qt";s:9:"quicktime";s:2:"ra";s:5:"audio";s:3:"rgb";s:5:"image";s:3:"rtx";s:4:"text";s:3:"snd";s:5:"audio";s:3:"sql";s:8:"database";s:3:"svg";s:9:"vectorgfx";s:3:"trm";s:11:"interactive";s:3:"ttf";s:13:"font_truetype";s:3:"w6w";s:8:"document";s:3:"wax";s:5:"audio";s:4:"webm";s:5:"video";s:2:"wm";s:5:"video";s:3:"wmf";s:9:"vectorgfx";s:3:"wmx";s:5:"video";s:4:"woff";s:4:"font";s:4:"word";s:8:"document";s:3:"wri";s:8:"document";s:3:"xla";s:11:"spreadsheet";s:4:"xlam";s:11:"spreadsheet";s:3:"xlc";s:11:"spreadsheet";s:3:"xlm";s:11:"spreadsheet";s:3:"xlt";s:11:"spreadsheet";s:4:"xltm";s:11:"spreadsheet";s:4:"xltx";s:11:"spreadsheet";s:3:"xlw";s:11:"spreadsheet";s:3:"xml";s:4:"code";s:3:"xsl";s:5:"style";s:4:"xslt";s:4:"code";}}}

HansSchultz commented 8 years ago

The problem comes between FooGallery 1.2.9 and 1.2.10. Thus 1.2.9 works and 1.2.10 does not.

HansSchultz commented 8 years ago

Did you manage to reproduce the error?