Hello,
I migrated a Joomla 3 site to Joomla 6. Phoca Gallery data (categories and images) was copied directly from the old database into the new one via SQL, because the transfer tool failed repeatedly. All 224 categories and 4919 images are present and the category tree is complete. The image files including all thumbnail sizes are on the server and can be opened directly via their URL. In the frontend, however, every thumbnail is rendered as <img src="/">, so the browser shows the alt text instead of the picture. The lightbox link to the large thumbnail is generated correctly. A newly uploaded image displays fine. Comparing the database rows of an imported image and a newly uploaded one field by field shows no relevant difference. Which field or setting does Phoca Gallery use to build the thumbnail src, and what is missing in the migrated records?
luseklw
Problem with migration to Joomla6
- Benno
- Phoca Hero

- Posts: 10304
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Problem with migration to Joomla6
Hi,
The recommended approach is to first migrate from Phoca Gallery for J3 to Phoca Gallery for J4 by following these instructions, and only then perform the updates to J5 and J6.
Kind regards,
Benno
The recommended approach is to first migrate from Phoca Gallery for J3 to Phoca Gallery for J4 by following these instructions, and only then perform the updates to J5 and J6.
Kind regards,
Benno
-
luseklw
- Phoca Member

- Posts: 33
- Joined: 29 Jan 2013, 16:39
Re: Problem with migration to Joomla6
Hi,
Thanks Benno for the pointer. We found the actual cause, so here is the solution for anyone with the same problem.
Setup: Joomla 3 site with Phoca Gallery 4.4.x, migrated to a fresh Joomla 6 installation with the current Phoca Gallery. Data was copied directly from the old database into the freshly installed Phoca tables (data only, without _styles), which matches the official migration guide. All images and thumbnails were present on the server.
Symptom: In the frontend, every thumbnail was rendered as <img src="/">, so the category title appeared instead of the picture. In the backend image list, only "Enlarge Image" appeared. Clicking a thumbnail opened the full image correctly. Newly uploaded images worked fine. "Recreate Thumbnails" regenerated the files successfully but did not change anything.
Cause: In all migrated image records, the column extid contained the value '0'. Newly uploaded images have an empty string '' there. With '0', the current Phoca Gallery apparently treats the image as an external image and takes the thumbnail URL from the empty external fields, which results in src="/". The link to the large image is built differently, which is why it kept working.
Fix:
sql
UPDATE `#__phocagallery` SET extid = '' WHERE extid = '0';
Replace #__ with your table prefix. Only do this if you have no real external images (check that the columns exts and extm are empty). After this, all thumbnails were displayed immediately, including those that had not been regenerated.
Two further things we noticed along the way:
• After copying the data, the column approved was 0 for all images (the backend showed "Count of not authorized images"). Fix: UPDATE #__phocagallery SET approved = 1 WHERE approved <> 1; Please check the values in your old database first.
• Do not transfer categories in parts. The category tree breaks if parent categories are missing, and only a few categories are shown.
Hope this saves someone a few hours.
Kind regards
luseklw
Thanks Benno for the pointer. We found the actual cause, so here is the solution for anyone with the same problem.
Setup: Joomla 3 site with Phoca Gallery 4.4.x, migrated to a fresh Joomla 6 installation with the current Phoca Gallery. Data was copied directly from the old database into the freshly installed Phoca tables (data only, without _styles), which matches the official migration guide. All images and thumbnails were present on the server.
Symptom: In the frontend, every thumbnail was rendered as <img src="/">, so the category title appeared instead of the picture. In the backend image list, only "Enlarge Image" appeared. Clicking a thumbnail opened the full image correctly. Newly uploaded images worked fine. "Recreate Thumbnails" regenerated the files successfully but did not change anything.
Cause: In all migrated image records, the column extid contained the value '0'. Newly uploaded images have an empty string '' there. With '0', the current Phoca Gallery apparently treats the image as an external image and takes the thumbnail URL from the empty external fields, which results in src="/". The link to the large image is built differently, which is why it kept working.
Fix:
sql
UPDATE `#__phocagallery` SET extid = '' WHERE extid = '0';
Replace #__ with your table prefix. Only do this if you have no real external images (check that the columns exts and extm are empty). After this, all thumbnails were displayed immediately, including those that had not been regenerated.
Two further things we noticed along the way:
• After copying the data, the column approved was 0 for all images (the backend showed "Count of not authorized images"). Fix: UPDATE #__phocagallery SET approved = 1 WHERE approved <> 1; Please check the values in your old database first.
• Do not transfer categories in parts. The category tree breaks if parent categories are missing, and only a few categories are shown.
Hope this saves someone a few hours.
Kind regards
luseklw