Post by straightlight » Sat Feb 22, 2020 5:10 am

If you only use one store, then the store ID 0 should be also updated in there. However, if you use multiple stores and multiple languages, you might need to review each SEO URLs from, either, PHPMyAdmin or from your OC admin to ensure you are associating the values accordingly from both fields.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by TG1313 » Sat Feb 22, 2020 5:42 am

I use only one store.
Am i understanding you correctly that i should add one record to Store table?
And if that table stays empty, i might have problems?

it has 4 fields - store id, name, url, ssl

Do you know (or can help) what should be the right values for these fields? Or does it matter?
also what other Tables (that have foreign keys to table Store) i should update?
I am aware of SEO_URL table. Any other?

Thank you.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by glolar » Mon Apr 20, 2020 4:57 pm

straightlight wrote:
Sat Feb 22, 2020 3:31 am
By simply renaming the old table to your new table (or by copying the data via your new table) should not impact any losses unless you had an important mount of data where your browser may have expired the activity due to the data being too large to complete its process. This may vary between servers where settings may need to be adjusted by your host.

However, if you don't have a huge amount of data in your seo_url table, you should be able to retrieve those data accordingly unless the store_id and the language_id fields do not match your languages and store IDs you may have originally from the store. Ensure that all rows do match from each-other in order to see the results as expected in the OC admin. These queries can be launched easily from your PHPMyAdmin.
straightlight, I am having a similar issue with the new seo_url table. After converting from 2.0.3.2 to 3.0.3.2, I had to move all my data from the old url_alias table to the new seo_url table, as the upgrade dropped the ball. Populating the new table with the date from the old table was easy, using simple SQL commands. I have Use SEO Urls set to Yes in the store, but all products that I have added an SEO URL to, generate a 404 not found error when the browser tries to navigate to the SEO URL. Products without an SEO URL work just fine. Can navigate just fine to the products that don't have an SEO URL set in the product.

So, I checked that my .htaccess file (in the /store subdirectory of the site, where OpenCart is installed) has the following two lines:

RewriteEngine On
RewriteBase /store

All the data in the new seo_url table is populated correctly, with language_id=1 and store_id=0 in all rows. Here is an example of one of the INSERT statements that populated the new table (there are 408 total records in the table):

Code: Select all

INSERT INTO `oc_seo_url` (`seo_url_id`, `store_id`, `language_id`, `query`, `keyword`) VALUES
(5094, 0, 1, 'product_id=83', 'lumenier-qav-xs-bnf'),
My question is, WHAT does the seo_url_id value (5094 in this example) correspond to? Is that supposed to match an seo_url_id field in a different table?

You can see a real-world example by navigating to www.skyreadyrc.com. Click on the first product in the Featured tab (Cobra 5" Racing Frame), which has an SEO URL of "https://skyreadyrc.com/store/cobra-5-racing-frame.html". This generates a 404 not found error. Click the back button to return to the home page, then click on the second product in the Featured tab (Cobra Lite 5" Racing Frame). It finds the product page just fine (a NON-SEO URL of "https://skyreadyrc.com/store/index.php?route=product/product&product_id=332").

I tripled checked, and I DO have "Use SEO Urls" set to Yes for the store.

Any idea what is going wrong here with my SEO Urls?

Thank you very much for taking a look at this.
Last edited by straightlight on Mon Apr 20, 2020 5:02 pm, edited 1 time in total.
Reason: Added code tags and corrected my username.

Increase Your Child's I.Q.
iPad Wallpapers
Turtle & Tortoise Screen Savers


User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by straightlight » Mon Apr 20, 2020 7:41 pm

You could use a software like Textcrawler to find out what the seo_url_id does. This field has no relation with other tables but is only there as a primary and incremented field in the database to support to other fields in the seo_url table. See the admin/model/design/seo_url.php file for more info on that.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Elevate » Thu Apr 23, 2020 12:11 am

The upgrade script is a joke. There's so much missing between a clean install and an upgraded version. I'm beginning to wonder if it is even worthwhile to use Opencart any longer.

ELEV8TE Website Development
https://www.elev8your.com


User avatar
New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by straightlight » Thu Apr 23, 2020 12:48 am

Elevate wrote:
Thu Apr 23, 2020 12:11 am
The upgrade script is a joke. There's so much missing between a clean install and an upgraded version. I'm beginning to wonder if it is even worthwhile to use Opencart any longer.
The reason why being is because there's no way to find out which SEO URL would be associated with the language ID accordingly when multiple language IDs are involved.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Elevate » Thu Apr 23, 2020 1:56 am

straightlight wrote:
Thu Apr 23, 2020 12:48 am
Elevate wrote:
Thu Apr 23, 2020 12:11 am
The upgrade script is a joke. There's so much missing between a clean install and an upgraded version. I'm beginning to wonder if it is even worthwhile to use Opencart any longer.
The reason why being is because there's no way to find out which SEO URL would be associated with the language ID accordingly when multiple language IDs are involved.
I didn't want to hijack this thread. That's one issue. There are many more issues with the opencart.sql file. I created a new, empty database and tried to import opencart.sql and it failed. It may be posted elsewhere or I can create a new topic but I have 0% confidence that an upgrade is running properly, even if you exclude the SEO URL issue.

ELEV8TE Website Development
https://www.elev8your.com


User avatar
New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by straightlight » Thu Apr 23, 2020 2:03 am

Elevate wrote:
Thu Apr 23, 2020 1:56 am
straightlight wrote:
Thu Apr 23, 2020 12:48 am
Elevate wrote:
Thu Apr 23, 2020 12:11 am
The upgrade script is a joke. There's so much missing between a clean install and an upgraded version. I'm beginning to wonder if it is even worthwhile to use Opencart any longer.
The reason why being is because there's no way to find out which SEO URL would be associated with the language ID accordingly when multiple language IDs are involved.
I didn't want to hijack this thread. That's one issue. There are many more issues with the opencart.sql file. I created a new, empty database and tried to import opencart.sql and it failed. It may be posted elsewhere or I can create a new topic but I have 0% confidence that an upgrade is running properly, even if you exclude the SEO URL issue.
Excluding the seo_url table will not fail the upgrade since this table is not included in the upgrade script due to the reasons I have explained above. There's no need to create a new topic about the same issue. However, if you'd like me to run the upgrade for you, send me a PM and I could complete the process for you as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Elevate » Thu Apr 23, 2020 2:17 am

straightlight wrote:
Thu Apr 23, 2020 2:03 am
Elevate wrote:
Thu Apr 23, 2020 1:56 am
straightlight wrote:
Thu Apr 23, 2020 12:48 am


The reason why being is because there's no way to find out which SEO URL would be associated with the language ID accordingly when multiple language IDs are involved.
I didn't want to hijack this thread. That's one issue. There are many more issues with the opencart.sql file. I created a new, empty database and tried to import opencart.sql and it failed. It may be posted elsewhere or I can create a new topic but I have 0% confidence that an upgrade is running properly, even if you exclude the SEO URL issue.
Excluding the seo_url table will not fail the upgrade since this table is not included in the upgrade script due to the reasons I have explained above. There's no need to create a new topic about the same issue. However, if you'd like me to run the upgrade for you, send me a PM and I could complete the process for you as a custom job.
I appreciate the offer but I've already run the upgrade. It misses everything in the events table. I'm still exploring to see what else is missing.
Open up the opencart.sql file and take a look at the queries for the events table. It's missing sort orders so it fails.

To clarify, the upgrade doesn't produce an error message anywhere. It simply doesn't add the events to the table during the upgrade process.

ELEV8TE Website Development
https://www.elev8your.com


User avatar
New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by straightlight » Thu Apr 23, 2020 2:37 am

Re-run the SQL query for the oc_event table from PHPMyAdmin and see if that rectifies the issue. Ensure that your database table prefix name also matches with the query you're pasting in the SQL tab of your Opencart database prior on running the query.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Elevate » Thu Apr 23, 2020 3:56 am

straightlight wrote:
Thu Apr 23, 2020 2:37 am
Re-run the SQL query for the oc_event table from PHPMyAdmin and see if that rectifies the issue. Ensure that your database table prefix name also matches with the query you're pasting in the SQL tab of your Opencart database prior on running the query.
Just take a quick look at the data there and you will see what I'm talking about. It's quite obvious what is wrong with it.

ELEV8TE Website Development
https://www.elev8your.com


User avatar
New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by straightlight » Thu Apr 23, 2020 4:02 am

Elevate wrote:
Thu Apr 23, 2020 3:56 am
straightlight wrote:
Thu Apr 23, 2020 2:37 am
Re-run the SQL query for the oc_event table from PHPMyAdmin and see if that rectifies the issue. Ensure that your database table prefix name also matches with the query you're pasting in the SQL tab of your Opencart database prior on running the query.
Just take a quick look at the data there and you will see what I'm talking about. It's quite obvious what is wrong with it.
Depending on the OC version you're using, see this solution for OC v3.0.2.0 release: viewtopic.php?f=19&t=213184&p=761969#p761969 .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Elevate » Thu Apr 23, 2020 6:43 am

straightlight wrote:
Thu Apr 23, 2020 4:02 am
Elevate wrote:
Thu Apr 23, 2020 3:56 am
straightlight wrote:
Thu Apr 23, 2020 2:37 am
Re-run the SQL query for the oc_event table from PHPMyAdmin and see if that rectifies the issue. Ensure that your database table prefix name also matches with the query you're pasting in the SQL tab of your Opencart database prior on running the query.
Just take a quick look at the data there and you will see what I'm talking about. It's quite obvious what is wrong with it.
Depending on the OC version you're using, see this solution for OC v3.0.2.0 release: viewtopic.php?f=19&t=213184&p=761969#p761969 .
That helps. It's an upgrade from 2.3.0.2 to 3.0.2.0
I will probably look over the entire opencart.sql file because I have a feeling more is missing now.

ELEV8TE Website Development
https://www.elev8your.com


User avatar
New member

Posts

Joined
Fri Jul 06, 2018 12:40 am
Location - Denver, Colorado, USA

Post by Rainforest » Mon Aug 23, 2021 8:08 pm

como wrote:
Tue Jan 15, 2019 1:02 am
Here I like to publish my more general and simple solutin.
You should run just one MySQL line:

Code: Select all

INSERT INTO `oc_seo_url` (`language_id`, `query`, `keyword`) SELECT 1 AS `language_id`, `query`, `keyword` FROM `oc_url_alias`
This 1 line SQL totally fixed the issue. I had upgraded from 2.3.0.2 and noticed all ym seo urls were gone (3400). All back with that one command.

Self Taught Opencart User & Developer Since 2010.


User avatar
Active Member

Posts

Joined
Fri Jan 28, 2011 3:50 am

Post by websiteworld » Mon Mar 07, 2022 9:00 pm

I thought I would chime in, I think it's a much better practice to export the data from the old database table and then add a column for store_id and in my case make the value 0. After that, I just had to import the oc_seo_url table that already exists. Works perfectly now.

Attachments

export.jpg

export.jpg (72.22 KiB) Viewed 1438 times

import.jpg

import.jpg (72.52 KiB) Viewed 1438 times


User avatar
New member

Posts

Joined
Thu Oct 18, 2012 3:11 am

Who is online

Users browsing this forum: No registered users and 75 guests