WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#10642 closed defect (bug) (duplicate)

Cant insert image galleries into new posts (same on wordpress.com)

Reported by: kiprasm Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.5
Component: Gallery Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by dd32)

I'm having a problem inserting image galeries into new posts. In fact, this problem is also visible on wordpress.com !

The problem is: you can't insert images as a gallery to a new post, through Quick Press or Posts -> Add New
You can only insert photos as single images, by pressing "Insert into Post".
The source of the problem is (as i understand it), the fact that a new post, while it is not yet auto saved as a draft, it does not have an ID. So you can't attach new photos to it, because they need an ID of the post they are being attached to as their post_parent.

It is clearly visible, through Posts -> Add New. Try to add photos as a gallery right after you open up that page, you wont be able to do it. After pressing "Save all changes" the content of the Media popup will be blank, instead of a new Gallery tab appearing.
But, if you type in post title, then wait for the draft to be saved (you can know when it is saved when the line with the permalink appears right below the post title input), the media uploader will work as expected.

This is also why, media inserting as a gallery always works for edited posts (because they are already saved, therefore always have an id), and why it never works for Quick Press (because a post added through it never has an ID, because it only gets it when saved, and after you save it you can only edit it through Posts -> Edit).

Inserting images directly into the post (one by one, not as a gallery that is) works, because they are directly inserted into the post contents and are not saved separately, therefore they don't need a post_parent.

My questions are:

  • Was this always the case? I mean was this problem introduced in 2.8 or any other version ?
  • Is there any sane way to fix this?

Attachments (1)

wp282issue.png (16.4 KB) - added by mijk 6 years ago.
missing gallery tabs

Download all attachments as: .zip

Change History (10)

comment:1 @mijk6 years ago

  • Cc mijk added
  • Component changed from General to Gallery
  • Keywords gallery added
  • Severity changed from major to minor
  • Version changed from 2.8.1 to 2.8.4

I have the same issue, I have safe_mode on and here is my phpinfo:

PHP Version 5.2.6
Zend Version 2.2.0
Platform 64Bit
Loaded Extensions zip, libxml, xsl, xmlwriter, xmlrpc, dom, xmlreader, xml, wddx, tokenizer, sysvshm, sysvsem, session, pcre, SimpleXML, SPL, PDO, sockets, soap, snmp, SQLite, shmop, standard, Reflection, pspell, pgsql, pdo_sqlite, pdo_pgsql, pdo_mysql, odbc, mysqli, mysql, mime_magic, mhash, mcrypt, mbstring, json, imap, iconv, hash, gmp, gettext, gd, ftp, filter, exif, dba, date, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, imagick, ionCube Loader, Zend Optimizer
WordPress 2.8.4
Memory Limit 64 MB

Runtime Configuration: Details »
Maximum Execution Time
(max_execution_time) 30 seconds
The maximum size of an uploaded file
Maximum Post Size (post_max_size) 30 MB
Multibyte Function Overload (mbstring.func_overload) 0
Short Open Tags (short_open_tag) On
Tells whether the short form (<? ?>) of PHP's open tag should be allowed.
Security and Safe Mode:
Remote open Files (allow_url_fopen) Off
PHP Safe Mode (safe_mode) On
Open Basedir (open_basedir)
Disabled Function(disable_functions):
proc_open,readlink,pfsockopen,dl,openlog,syslog,putenv,pcntl_exec,pcntl_fork, pcntl_signal,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,socket_accept,socket_bind,socket_create,socket_create_listen,socket_listen,socket_create_pair,phpinfo

WordPress Info:

PHP libcurl (curl) Yes
PHP Streams API (streams) No
function fopen (fopen) No
function fsockopen (fsockopen) No
Built-in HTTP (exthttp) No
System Constants:
(WP_POST_REVISIONS) no limit
(AUTOSAVE_INTERVAL) 60 seconds
Journal Database Requests
(SAVEQUERIES) Off
(CONCATENATE_SCRIPTS) Off
Compress Javascripts (COMPRESS_SCRIPTS) Off
Compress Stylesheets (COMPRESS_CSS) Off
Enforce GZip Compression (ENFORCE_GZIP) Off

On other hand, I have found an obvious workaround to get the gallery tab back - it is simple: after putting post title, press <em>Save as draft</em> button, then add some images, click <em>Save all changes</em> and then the gallery tab appears as usual.

Forums thread covering this issue:
http://wordpress.org/support/topic/293822?replies=6#post-1215963

@mijk6 years ago

missing gallery tabs

comment:2 @mijk6 years ago

  • Severity changed from minor to normal
  • Version changed from 2.8.4 to 2.8.5

comment:3 @mijk6 years ago

  • Milestone changed from Unassigned to Future Release

comment:4 @dd326 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added; gallery removed

It is expected that the Gallery tab is not available and/or shown until the Save All Changes button is clicked after uploading images, This is in order to allow the user to modify descriptions / ordering and have that saved, In addition to showing the user the full list of images which would be in the gallery (ie. not just those just uploaded).

The white screen you're seeing after clicking save all changes however is weird, as it should reload straight to the gallery page.. And does for many other users.

comment:5 @mijk5 years ago

  • Version changed from 2.8.5 to 2.8.6

comment:6 @mijk5 years ago

  • Keywords needs-patch added; reporter-feedback removed

comment:7 @mijk5 years ago

  • Keywords reporter-feedback added; needs-patch removed

comment:8 @mijk5 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

comment:9 @dd325 years ago

  • Milestone Future Release deleted
  • Version changed from 2.8.6 to 2.8.5
Note: See TracTickets for help on using tickets.