mstm
(mstm)
12 يناير 2022، 9:01ص
1
Hi, after the conversion from phpBB Google indexing has collapsed and even after months has never recovered.
I believe the problem is due to the many 404 mistakes due to the permalinks not working.
They are the predefined ones generated by the conversion script.
How can I correct them?
For example https://www.mysite.com/viewtopic.php?t=1267 It’s not redirected.
Thanks
إعجابَين (2)
pfaffman
(Jay Pfaffman)
12 يناير 2022، 4:29م
2
Do the permalinks exist if you look at /admin/customize/permalinks
?
What do they look like?
If not, you’ll need to get a script to generate them.
إعجابَين (2)
mstm
(mstm)
12 يناير 2022، 6:39م
3
Thanks for your help @pfaffman , yes I have what you see in the previous image.
For the categories I used this and it works perfectly
/(viewforum.php\?)(?:.*&)?(f=\d+).*/\1\2
The ones I found after conversion are these but only works for the categories.
إعجاب واحد (1)
pfaffman
(Jay Pfaffman)
12 يناير 2022، 6:41م
4
No. Not the permalink site settings. The permalinks at the URL in the my last message.
إعجاب واحد (1)
mstm
(mstm)
12 يناير 2022، 6:48م
5
There are permalinks for the categories and now I understand what you mean.
During conversion the permalinks for discussions were not created.
Ok, there are more than 2500 discussions … for now I give up …
إعجاب واحد (1)
pfaffman
(Jay Pfaffman)
12 يناير 2022، 6:51م
6
You can see that the mapping from the old to the new is available with
./launcher enter app
rails c
TopicCustomField.all
So then you would run a script that for each of those values a permalink gets created. It’s hard to explain, but it’s possible.
إعجاب واحد (1)
mstm
(mstm)
12 يناير 2022، 7:11م
7
You’re right there are all the data of the old phpBB discussions.
Thanks anyway of the help, unfortunately I don’t know how to use them.
إعجاب واحد (1)
pfaffman
(Jay Pfaffman)
12 يناير 2022، 7:26م
8
This is an example from another importer. You might be able to adjust it to create the permalinks on your server.
def create_permalinks
puts '', 'Creating redirects...', ''
# https://example.forum.com/forums/questions/2005/missing-file.html
Topic.find_each do |topic|
pcf = topic.first_post.custom_fields
if pcf && pcf["import_id"]
id = pcf["import_id"]
slug = Slug.for(topic.title)
Permalink.create(url: "questions/#{id}/#{slug}.html", topic_id: topic.id) rescue nil
print '.'
end
end
end
You’d change the Permalink.create
line to match the links from phpBB
إعجابَين (2)
It is critical to get redirects in place for old content as part of a migration! I hope you can get this resolved, but maybe we need to update our documentation on migration @tshenry @dax to make this point?
إعجابَين (2)