Media Places keeps showing : There is no place yet!

Updated: 2023-09-09
Nextcloud version : 27.0.2
Operating system and version : Debian 12
Apache or nginx version : Apache 2.4.57-2
PHP version : 8.2.7

The issue you are facing:
I have just set up a new local installation and “Media Places” are always empty.
When checking the developer console in Chrome I see the following:
Call: https://MYSERVER/remote.php/dav/photos/MYUSER/places/
Result: HTTP/1.1 404 Not Found

When I check the database table: oc_file_metadata I see that I do indeed have metadata “photos_place”

I have also tried to run :
sudo -u www-data php occ photos:map-media-to-place

With no change in behaviour.

I have had it working, but I removed all media using the UI and uploaded it again, and after uploading again the places were not working anymore.

Is this the first time you’ve seen this error? : Y

Steps to replicate it:

  1. Fresh install of NextCloud
  2. Set up the user that should be the owner of the images
  3. Copy the the images into the users data/USER/files/Photos/some_folder_under directly on the filesystem
  4. Wait for the cron jobs or run:
  5. sudo -u www-data php occ files:scan USER
  6. sudo -u www-data php occ photos:map-media-to-place
  7. Check Places in Media - No results.
  8. Copy one file from the folder Photos/some_folder_under to Photos
  9. Now there is a Place available (If the image has GPS data that means)

The output of your Nextcloud log in Admin > Logging:

Logging does not show anything other than: 
OCP\Files\NotPermittedException: Could not create folder "/appdata_ocwgkjg1hf2a/preview/0/0/7/4/9/1/7/31488"

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocwgkjg1hf2a',
  'passwordsalt' => 'FqffPCV4t+/uztIHfsvrNnPszR6SHr',
  'secret' => 'jFZ7EXLB7Gq3lhwp1K3nf2ZVjx8T6wOJtahMUW0isF0NYReA',
  'trusted_domains' => 
  array (
    0 => 'd********.com',
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://g*******.com/nextcloud',
  'dbname' => 'n******d',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'n******d',
  'dbpassword' => '*********,
  'installed' => true,
  'maintenance' => false,
  'mail_domain' => 'g*******.com',
  'mail_from_address' => 'drive',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtphost' => '',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'a*******',
  'mail_smtppassword' => '************',
  'default_phone_region' => 'TH',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Movie',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',

The output of your Apache/nginx/system log in /var/log/____:

[04/Sep/2023:13:08:50 +0700] "PROPFIND /remote.php/dav/photos/affe/places/ HTTP/1.1" 207 1106 "-" "Mozilla/5.0 (X11; Linux x86_64) App
leWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36"

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

No errors found about this.

I have now recreated the problem.

When adding images using the filesystem i.e. add images directly to ./data/USER/files/Photos

What i did : Clean install of nextcloud.
Took the files folder from my backups. /data/USER/files/Photos/Phone
Waited ages for the cron-job to run.

Got tired and ran:
sudo -u www-data php occ files:scan USER
sudo -u www-data php occ photos:map-media-to-place

Still no Places…

Logged into nextcloud and copied a file from Photos/Phone to Photos.

Now I have a Place.

So it seems that Places only work when the image has come using the UI and not the filesystem.

Can someone verify or dement this claim?

Similar problem, nothing I can do makes the map app scan subfolders. I checked the database and the Lat/Lons for these photos are empty.