- Posts: 2
- Thank you received: 0
Support for SermonSpeaker 5.x is in bugfix mode only, the same as it is for Joomla 3.10.
I will not add any new features to this releases.
Please upgrade to SermonSpeaker 6.x and Joomla 4.x, which is better anyway.
I will not add any new features to this releases.
Please upgrade to SermonSpeaker 6.x and Joomla 4.x, which is better anyway.
Set Latest SermonID Counter / Index?
04 Apr 2020 01:36 #7596
by Henry
Set Latest SermonID Counter / Index? was created by Henry
I have to migrate my site onto a new Joomla instance (SermonSpeaker 5.9.2, on Joomla 3.9.16]. Because I have about 500 sermons, I moved all the SermonSpeaker data manually using SQL inserts -- being careful to make sure Series, Users, and Speaker IDs match.
After doing this, all the sermons correctly appear in our SermonSpeaker backend, however:
I assume there must be a stored value in the database somewhere that indicates what the "last sermon ID" is; but I can't find it anywhere. Can anyone help me find it?
(I've done this exact process about 3 years ago with another site migration, so I know I must be missing something obvious.)
After doing this, all the sermons correctly appear in our SermonSpeaker backend, however:
- listing sermons in the frontend fails ("Sorry, unfortunately I didn't find any Sermons")
- if I try to create a new sermon, it does so with SermonID = 0, not the next index [in my case 509]
I assume there must be a stored value in the database somewhere that indicates what the "last sermon ID" is; but I can't find it anywhere. Can anyone help me find it?
(I've done this exact process about 3 years ago with another site migration, so I know I must be missing something obvious.)
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
04 Apr 2020 09:30 #7597
by Thomas Hunziker
Replied by Thomas Hunziker on topic Set Latest SermonID Counter / Index?
The issue with the sermon (and series and speakers) ID is that this ID is an auto-increment column.
You can set the start value for that auto-increment with this command:
Instead of "tbl" you use the name of the sermonspeaker tables and instead of "100" you use the maximum ID in the table and add 1 to it. In your case "509".
Do the same also for the speaker and series tables as you will likely face the same issue there.
The frontend likely has the issue that the category IDs don't match anymore, or the asset table doesn't match the categories anymore.
Easiest way is probably to create the categories fresh so Joomla will create all the needed stuff. And then you either batch assign the new categories to the sermons/speakers/series or you manipulate the sermonspeaker tables directly and replace the old catid with the new one.
You can set the start value for that auto-increment with this command:
Code:
ALTER TABLE tbl AUTO_INCREMENT = 100;
Do the same also for the speaker and series tables as you will likely face the same issue there.
The frontend likely has the issue that the category IDs don't match anymore, or the asset table doesn't match the categories anymore.
Easiest way is probably to create the categories fresh so Joomla will create all the needed stuff. And then you either batch assign the new categories to the sermons/speakers/series or you manipulate the sermonspeaker tables directly and replace the old catid with the new one.
Please Log in or Create an account to join the conversation.
04 Apr 2020 21:27 - 04 Apr 2020 21:27 #7598
by Henry
Replied by Henry on topic Set Latest SermonID Counter / Index?
Thank you so much. In the end, this was user error (which your tip to AUTO_INCREMENT) clued me into: when importing the PREFIX_sermon_xxx tables, I did not run the SQL commands:
to:
.... as these commands were found way down in the SQL export file.
After I reran the import (fixing catIDs and userIDs to match those in the new CMS instance); and being sure to execute the above, previously-neglected commands, everything works perfectly.
Code:
ALTER TABLE `PREFIX_sermon_series`
ALTER TABLE `PREFIX_sermon_sermons`
ALTER TABLE `PREFIX_sermon_speakers`
to:
- create indexes for those tables;
- increment the primary keys;
.... as these commands were found way down in the SQL export file.
After I reran the import (fixing catIDs and userIDs to match those in the new CMS instance); and being sure to execute the above, previously-neglected commands, everything works perfectly.
Last edit: 04 Apr 2020 21:27 by Henry.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
04 Apr 2020 22:43 #7599
by Thomas Hunziker
Replied by Thomas Hunziker on topic Set Latest SermonID Counter / Index?
Great to hear that you were able to fix it!
Please Log in or Create an account to join the conversation.
Time to create page: 0.110 seconds