pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 265 forks source link

Can't upload images on pods form in Safari #5188

Open ragav-kumar opened 5 years ago

ragav-kumar commented 5 years ago

Issue Overview

I'm using a pod form in the page template to upload images to the single page of a pod. This works great on desktop and Android devices, but I'm told that the "Add File" link from the form fails in Safari (I don't have an iPhone myself, but my client does, so this is their observation).

Expected Behavior

When the "Add File" link is clicked, a dialog appears for file selection.

Current Behavior

If the user is using an iPhone and loads the site in Safari, then there is no effect of clicking on the "Add File" link

Steps to Reproduce (for bugs)

  1. Have a pod with a file select field; we will call the pod $pod and the field "photos".
  2. In the template of the single-pod.php file, insert the following: echo $pod->form(array('photos'));
  3. On an iPhone, use safari to visit the page with the form
  4. Click on the Add File link

Possible Solution

No clue. I don't know what the problem is, I'm filing this issue because I do not understand the problem.

WordPress Environment

I have been asked to keep identifying information out of this publicly visible setting.

``` WordPress Version: 4.9.8 PHP Version: 7.1.23 MySQL Version: 5.7.24 Server Software: Apache/2.4.37 (Unix) OpenSSL/1.0.2g Your User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Session Save Path: /srv/users//tmp/ Session Save Path Exists: Yes Session Save Path Writeable: Yes Session Max Lifetime: 1440 Opcode Cache: Apc: No Memcached: No OPcache: Yes Redis: No Object Cache: APC: No APCu: No Memcache: No Memcached: No Redis: No WPDB Prefix: wp_aa3fdefdb5_ WP Multisite Mode: Yes WP Memory Limit: 256M Pods Network-Wide Activated: No Pods Install Location: /srv/users//apps//public/wp-content/plugins/pods/ Pods Tableless Mode Activated: No Pods Light Mode Activated: No Currently Active Theme: Currently Active Plugins: Anti-Splog: 2.2.1 Appointments+: 2.4.0 BackupBuddy: 8.3.1.0 Bookly: 16.1 Bookly Chain Appointments (Add-on): 1.6 Bookly Google Maps Address (Add-on): 1.2 Bookly Invoices (Add-on): 1.2 Bookly Locations (Add-on): 2.1 Bookly Pro (Add-on): 1.0 Cloner: 1.7.7 Cloudflare: 3.3.2 Defender Pro: 2.0.1 Forums: 2.0.2.4 Google Analytics +: 3.1.7.2 Google Maps Pro: 2.9.4 Gravity Forms: 2.3.6 Gravity Forms Business Hours by GravityView: 2.1 Gravity Forms Chained Selects Add-On: 1.1.2 Gravity Forms User Registration Add-On: 3.9.5 Hummingbird Pro: 1.9.2 iThemes Security Pro: 5.5.4 LoopBuddy: 1.4.38 MarketPress: 3.2.8 Membership 2 Pro: 1.1.5 Pods - Custom Content Types and Fields: 2.7.9 Pods Gravity Forms Add-On: 1.4.1 Pro Sites: 3.5.9.3 SmartCrawl: 2.2.2.7 Smush Pro: 2.9.1 Snapshot Pro: 3.1.9.2 Ultimate Branding: 2.2.1 WP Crontrol: 1.6.2 WPMU DEV Dashboard: 4.5.2 ```

Pods Package Export (helpful!)

My client has asked me to include only a minimal version here.

{"meta":{"version":"2.7.9","build":1541438213},"pods":{"1016":{"id":1016,"name":"simplified_pod","label":"Simplified Pods","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"photos":{"id":1017,"name":"photos","label":"Photos","description":"","help":"","class":"","type":"file","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"multi","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_field_template":"rows","file_add_button":"Add File","file_modal_title":"Attach a file","file_modal_add_button":"Add File","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","file_allowed_extensions":""}},"show_in_menu":"1","label_singular":"Simplified Pod","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"simplified_pod","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"0","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","built_in_taxonomies_add_status":"0","built_in_taxonomies_body_type":"0","built_in_taxonomies_business_category":"0","built_in_taxonomies_business_tag":"0","built_in_taxonomies_car_condition":"0","built_in_taxonomies_category":"0","built_in_taxonomies_drive_train":"0","built_in_taxonomies_exterior_colour":"0","built_in_taxonomies_exterior_feature":"0","built_in_taxonomies_extra_feature":"0","built_in_taxonomies_fuel_type":"0","built_in_taxonomies_gearbox_type":"0","built_in_taxonomies_interior_colour":"0","built_in_taxonomies_interior_feature":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_location":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_product_category":"0","built_in_taxonomies_product_tag":"0","built_in_taxonomies_safety_feature":"0","built_in_taxonomies_service_type":"0","built_in_taxonomies_vehicle_category":"0","built_in_taxonomies_vehicle_exterior_colors":"0","built_in_taxonomies_vehicle_fuel_type":"0","built_in_taxonomies_vehicle_interior_colors":"0","built_in_taxonomies_vehicle_locations":"0","built_in_taxonomies_vehicle_state":"0","built_in_taxonomies_vehicle_statuses":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","layout-meta-box-nonce":"c498de69db"}}}

Workaround or Alternate Solution Until Bug is Addressed

Related Issues and/or PRs

JLNNN commented 5 years ago

Did your client grant safari access to read/write the photos?

bwdgroup commented 4 years ago

This issue still exists, it only appears to happen on IOS devices. The only solution is not to use the Plupload on any image fields.

sc0ttkclark commented 3 years ago

Possibly related https://github.com/moxiecode/plupload/issues/1318

papa-pup commented 3 years ago

Hi @sc0ttkclark , As mentioned, here I provide details of this issue.

On IOS devices with Safari, when the file field is set as PLupload, the add file button will not work. It will only work if it is default set as WordPress Media Upload. On IOS device with Chrome, no issue at all.

On Android Device using Chrome both PLupload and WordPress Media Upload works but.... there seems to be a bug with PLupload - When first loaded the page for data editing, the list of files/images are not scrollable (when there is more than 5 items) until a file is added.

However, when on IOS device with Safari and WordPress Media Upload mode, this occurs but not on IOS device with Chrome.

Looks like there are multiple issues with regards to file field.

sc0ttkclark commented 3 years ago

We should see if this is resolved for single-select file fields set to plupload in 2.8.

papa-pup commented 3 years ago

We should see if this is resolved for single-select file fields set to plupload in 2.8.

I can also help to do the test before the release too! 😃
Let me know how to participate. PM me.

sc0ttkclark commented 3 years ago

@papa-pup

Follow the testing instructions at: https://pods.io/2021/02/11/pods-2-8-beta-1-released-and-the-field-guide-to-pods-2-8/

Here's where the code is located: https://github.com/pods-framework/pods/tree/release/2.8

pdclark commented 3 years ago

QA failed: Add File appears from plupload, but pressing button does nothing on iOS Safari. WP upload option works fine.

sc0ttkclark commented 3 years ago

We'll need to do some further research to see why iOS Safari won't work for plupload and why Android Chrome won't allow scrolling through list of multiple files uploaded.