Open Catfriend1 opened 2 weeks ago
I've found a temporary workaround on the server side (to be used until the app is fixed giving & instead & as query params).
In /var/www/piwigo/action.php
// Custom: Fix Piwigo-NG Android app
if (strpos($_SERVER['QUERY_STRING'], '&part=e') !== false) {
$_GET['part'] = 'e';
}
// Put code above before this line (l. 73)
if (!isset($_GET['id'])
or !is_numeric($_GET['id'])
or !isset($_GET['part'])
or !in_array($_GET['part'], array('e','r','f') ) )
@remi-martin Could you please take a look? I think this is pretty easy to fix as the app queries pictures with "&part=e" to action.php instead of "&part=e"
Looks like I have another issue when I try to share:
I/flutter (13097): [GET] null
I/flutter (13097): [200] null
I/flutter (13097): [Instance of 'XFile']
E/flutter (13097): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method shareFilesWithResult on channel dev.fluttercommunity.plus/share)
E/flutter (13097): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)
E/flutter (13097): <asynchronous suspension>
E/flutter (13097): #1 MethodChannelShare.shareFilesWithResult (package:share_plus_platform_interface/method_channel/method_channel_share.dart:140:9)
E/flutter (13097): <asynchronous suspension>
E/flutter (13097):
*Edit: will be fixed with package version upgrade
I've made sure all permissions were granted and I selected a write-able directory on my internal storage in both cases.
PiwigoNG: most recent version from GitHub
Log when hitting the share button for a picture:
Log when hitting the share button for a video:
The URL in question according to the nginx log is: https://(server):(port)/action.php?id=27143&part=e If I open this via Chrome on PC, it works.
I noticed the log saying "amp;" - Conclusion: I think the app has an escaping error here.
Via Chrome on PC, I can reproduce the error:![image](https://github.com/Piwigo/piwigo-flutter-app/assets/16361913/c8f2a890-15bf-48b0-8366-9d9a23117edc)