Import from Sonnb and Photopost

Kevin

Well-known member
#21
Did you import sonnb's gallery first and retain the content IDs?

If so, the URL structure is almost identical (with an additional bit of code that covers the "photos" route, IIRC) so the redirection actually should happen automatically if you retained the same IDs. If you didn't do this, unfortunately you'd either need to do the import again, or look for some other custom coded redirection solution.
Is there something that needs to be set for the Sonnb redirection to take place? Perhaps I am not understanding what exactly should happen automatically.

I did an import, retaining the old IDs, but no redirect is taking place.

Old URL: https://coolscifi.com/gallery/photos/kurt-miller-art-gallery.3836/
New URL: https://coolscifi.com/media/kurt-miller-art-gallery.3836/
 

Chris D

XenForo developer
Staff member
#22
You'd need to change the "media" route to "gallery".

Or, more accurately, you need to change the existing route filter (Admin CP > Route Filters) to point to gallery instead of media.
 

Kevin

Well-known member
#23
You'd need to change the "media" route to "gallery".

Or, more accurately, you need to change the existing route filter (Admin CP > Route Filters) to point to gallery instead of media.
Thanks. I was thinking the part above about the route was for something else Dakis was trying to achieve, not for the redirects from Sonnb in general.

I tried changing the route and it worked fine but I'm trying to take a step back and keep some stuff as close to stock as possible so I ended up doing an .htaccess entry which so far seems to be working fine also at least for the direct links. There are some misc. other links structures but I'll handle them later, for now the majority of the links indexed in Google are direct page links.
Code:
# Rewrite old Sonnb XenGallery /gallery links to XenForo Gallery /media (works only if IDs were kept during import)
RewriteRule ^gallery/(.*)$ /media/$1 [R=301,NC,L]
 

Dakis

Well-known member
#25
I finally completed the conversion from sonnbs gallery to Xenforo Media Gallery :)

Now if I can only find the courage to convert my old photopost gallery :p
 

Sola

Active member
#26
That query actually should work fine.

The allowed length of each field is the same so
you shouldn't hit any character limits.
Chris, I backed up my db and tried to run this query as above to correct a similar issue:

Code:
UPDATE xengallery_media
SET media_title = media_description
WHERE media_title = 'Imported Item'
I get a "xengallery media doesn't exist" response.

Please help provide a current query to move the description in media content to media title (to replace imported item). There's way too many to handle manually via inline editing.

Hopefully, character limits will still NOT be a problem.

Thanks a lot.
 

Chris D

XenForo developer
Staff member
#27
If you're now running XFMG 2.x then the correct queries would be:
SQL:
UPDATE xf_mg_media_item
SET title = description
WHERE title = 'Imported Item'
 
Top