Hi Folks,
I'm using Piwigo 2.6.0. and its iOS latest version. My problem is that I'm not able to refresh albums list on iOS. The only Album it shows on iOS is "undefined", which doesn't match my albums list on the web.
How can I fix it? I need your help.
Thanks a lot!
Offline
Hello
is that in the public part? What changed recently on the gallery? Try to disable plugins If you did the upload recently, re-upload files by overwriting by Ftp
Offline
Hi flop25,
I've reinstalled piwigo 2.6.0 by ftp, and I haven't made any changes. The problem is still there.
Offline
Great but could you also answer me Thx
and test disabling plugins too
Offline
my galary is on http://fanta.shaoyimin.com
I disabled all plugins, but nothing changes.
thanks!
Offline
Hello all,
I have a clean install of 2.6, I have not added any plugins, templates, nothing only a clean 2.6 (yesterday)... I am using PHP: 5.4.21... my phone is iPhone 4, the iPhone app is not working correctly, no albums are appearing, only ----- and undefined, if I do add a folder is does add to the root folders, but it still does not appear on the iPhone app. any idea's? Also, this app worked before I did made a clean install of 2.6
coolsun19 wrote:
my galary is on http://fanta.shaoyimin.com
I disabled all plugins, but nothing changes.
thanks!
I have registered on your Piwigo as "plg". Can you give me "administrator" status on [Administration > Users > Manage] so that I can test? If not, please tell us your version of PHP.
Offline
rickx123456 wrote:
Hello all,
I have a clean install of 2.6, I have not added any plugins, templates, nothing only a clean 2.6 (yesterday)... I am using PHP: 5.4.21... my phone is iPhone 4, the iPhone app is not working correctly, no albums are appearing, only ----- and undefined, if I do add a folder is does add to the root folders, but it still does not appear on the iPhone app. any idea's? Also, this app worked before I did made a clean install of 2.6
please open a new thread and post a link to your galery please
Offline
It looks like the same problem, I have asked rickx123456 to give details on this very topic :-)
Offline
Hello again, the website is http://superholky.com
All folders require login
Thank you for your assistance!
Rick
The good news is that I reproduce the problem with my own iphone. Let's investigate now!
Offline
Hello again,
I am happy to give you a admin login if you need one (send me an email and I will respond), there is nothing overly sensitive on the site.
Thanks,
Rick
hello plg,
I just updated your account to administrator.
Excited to have your help. Thanks!
Offline
rvelices, I've found the problem. It is related to [Subversion] r22729. The output of pwg.categories.getList was modified if tree_output=true. Actually you fixed a bug because in Piwigo 2.5, when using tree_output=true, the "categories" key was missing in the output. Unfortunately the mobile application (and maybe others) have been built with this this output.
To sum up, in Piwigo 2.5:
$ perl tools/piwigo_remote.pl --base_url=http://localhost/piwigo/dev/branches/2.5 --user=plg --password=plg --action=pwg.categories.getList --define recursive=true --define tree_output=true
...
$VAR1 = [
{
'global_rank' => '1',
'nb_categories' => 1,
'name' => 'Tout premier album',
'sub_categories' => {
'1' => {
'global_rank' => '1.1',
'nb_categories' => 0,
'name' => 'kid 1',
'representative_picture_id' => undef,
'uppercats' => '1,3',
'permalink' => undef,
'comment' => '',
'max_date_last' => undef,
'id_uppercat' => '1',
'url' => 'http://localhost/piwigo/dev/branches/2.5/index.php?/category/3-kid_1',
'date_last' => undef,
'id' => 3,
'total_nb_images' => 0,
'nb_images' => 0
}
},
'representative_picture_id' => undef,
'uppercats' => '1',
'permalink' => undef,
'comment' => '',
'max_date_last' => undef,
'id_uppercat' => undef,
'url' => 'http://localhost/piwigo/dev/branches/2.5/index.php?/category/1-tout_premier_album',
'date_last' => undef,
'id' => 1,
'total_nb_images' => 0,
'nb_images' => 0
}
];
and in Piwigo 2.6:
$ perl tools/piwigo_remote.pl --base_url=http://localhost/piwigo/dev/branches/2.6 --user=plg --password=plg --action=pwg.categories.getList --define recursive=true --define tree_output=true
...
$VAR1 = {
'categories' => [
{
'global_rank' => '1',
'nb_categories' => 1,
'name' => 'first album',
'sub_categories' => [
{
'global_rank' => '1.1',
'nb_categories' => 0,
'name' => 'kid 1',
'representative_picture_id' => undef,
'uppercats' => '1,3',
'permalink' => undef,
'comment' => '',
'max_date_last' => undef,
'id_uppercat' => '1',
'url' => 'http://localhost/piwigo/dev/branches/2.6/index.php?/category/3-kid_1',
'date_last' => undef,
'id' => 3,
'total_nb_images' => 0,
'nb_images' => 0
}
],
'representative_picture_id' => undef,
'uppercats' => '1',
'permalink' => undef,
'comment' => '',
'max_date_last' => undef,
'id_uppercat' => undef,
'url' => 'http://localhost/piwigo/dev/branches/2.6/index.php?/category/1-first_album',
'date_last' => undef,
'id' => 1,
'total_nb_images' => 0,
'nb_images' => 0
}
]
};
With this simple change, the problem is fixed:
[pierrick@pierrick-desktop] ~/public_html/piwigo/dev/branches/2.6 $ svn diff Index: ws.php Index: include/ws_functions/pwg.categories.php =================================================================== --- include/ws_functions/pwg.categories.php (revision 26920) +++ include/ws_functions/pwg.categories.php (working copy) @@ -459,7 +459,7 @@ if ($params['tree_output']) { - $cats = categories_flatlist_to_tree($cats); + return categories_flatlist_to_tree($cats); } return array(
Are you OK with that?
PS 1: ws_std_get_category_xml_attributes() is nice.
PS 2: in function categories_flatlist_to_tree you changed
$tree[$key] = &$node;
into:
$tree[] = &$node;
(and the equivalent for sub_categories)
Why ? I doesn't seem to impact the mobile app, but I wonder why you changed it. I even see that in Piwigo 2.5 output, the "key" is not the category_id and was maybe there for sort order purpose (but the mobile app has no problem without it and sort order is correct)
Offline
plg wrote:
Why ? I doesn't seem to impact the mobile app, but I wonder why you changed it.
$key was useless and affecting output:
Look at the diff in your output:
'sub_categories' => { '1' => {
versus
'sub_categories' => [ {
First case it is an object, second case an array ...
Offline