Post by derzet » Sun Jun 14, 2020 8:59 pm

still having trouble with SEO and latest 3.0.3.4-core-pre, opening a product gives

Code: Select all

Fatal error: Uncaught Exception: Error: Unknown column 'query' in 'where clause'<br />Error No: 1054<br />SELECT * FROM oc_seo_url WHERE query = 'product_id=42' in system/library/db/mysqli.php:40
In fact there's no such column in my database and - having a brief look - no code in the installer to create it

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by straightlight » Mon Jun 15, 2020 7:51 am

derzet wrote:
Sun Jun 14, 2020 8:59 pm
still having trouble with SEO and latest 3.0.3.4-core-pre, opening a product gives

Code: Select all

Fatal error: Uncaught Exception: Error: Unknown column 'query' in 'where clause'<br />Error No: 1054<br />SELECT * FROM oc_seo_url WHERE query = 'product_id=42' in system/library/db/mysqli.php:40
In fact there's no such column in my database and - having a brief look - no code in the installer to create it
Not being part of your database is another story, you need to find a way to import those fields and values as the same situation encountered between the OC v2.x and OC v3.x releases with the oc_url_alias and the oc_seo_url fields since it is unlikely possible to create a migration extension specifically for the stores and languages where a store would have more than one store associated with more than one language in this case.

As for the SQL error message displayed, however, you'd be correct. I seem to have missed a few locations in the admin. I will update the package shortly with the solution. Thanks for reporting this issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Mon Jun 15, 2020 10:15 am

Package updated.

- Fixed SEO URL on admin catalog models.
- Fixed install/opencart.sql to show: seo_profile instead of seo_url in the oc_seo_profile queries.
- Fixed value = to read: `value` = in admin/model/catalog/product.php file since value is a reserved term with mySQLi.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Mon Jun 15, 2020 10:27 am

Package updated.

- Reverted password_hash to sha1 from catalog/model/account/customer.php file until the master branch.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by derzet » Mon Jun 15, 2020 9:56 pm

register password working now

but still crashing because of missing 'query' column in 'seo_url' table

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by straightlight » Mon Jun 15, 2020 9:57 pm

derzet wrote:
Mon Jun 15, 2020 9:56 pm
register password working now

but still crashing because of missing 'query' column in 'seo_url' table
Please read my previous post about this issue. Again, you are the one who needs to find a way to integrate your old table with the new seo_url table. Then, to configure your SEO profiles from the OC admin.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Mon Jun 15, 2020 10:36 pm

derzet wrote:
Mon Jun 15, 2020 9:56 pm
but still crashing because of missing 'query' column in 'seo_url' table
Clean install or upgrade?

OC 2.3.0.2 | OC 3.0.3.6 | Extensions converted by me | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by derzet » Mon Jun 15, 2020 11:24 pm

derzet wrote:
Mon Jun 15, 2020 9:56 pm
but still crashing because of missing 'query' column in 'seo_url' table
Then, to configure your SEO profiles from the OC admin.
[/quote]

Hmm, looks like I got you wrong. I thought you would add an empty query column.
Aside from that I'm not quite sure what you meant with 'configuring SEO profiles from the OC admin' ?

Having created that query column manually in the meantime
I just had a first look into route=design/seo_url and tried to edit and save an item and got a crash because of another misspelled getSeoUrlByKeyword
in line #613 of admin\controller\design\seo_url.php
After fixing this to getSeoUrlsByKeyword saving works, but nothing has been saved to the query column, and actually I can't find any code in the controller to do so.

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by derzet » Mon Jun 15, 2020 11:39 pm

xxvirusxx wrote:
Mon Jun 15, 2020 10:36 pm
Clean install or upgrade?
Clean. I'm removing my former code and db completely with every new update.
Perhaps it makes sense to add an extra trailing part to the zip file like 3.0.3.4-core-pre-XX or some kind of version file inside to make sure we know which version we're talking about? All I can tell is the last one i downloaded had 17Mb instead of the former 14Mb

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by straightlight » Mon Jun 15, 2020 11:57 pm

derzet wrote:
Mon Jun 15, 2020 11:39 pm
xxvirusxx wrote:
Mon Jun 15, 2020 10:36 pm
Clean install or upgrade?
Clean. I'm removing my former code and db completely with every new update.
Perhaps it makes sense to add an extra trailing part to the zip file like 3.0.3.4-core-pre-XX or some kind of version file inside to make sure we know which version we're talking about? All I can tell is the last one i downloaded had 17Mb instead of the former 14Mb
Which location do you encounter the query error? More information is needed.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by xxvirusxx » Mon Jun 15, 2020 11:59 pm

This fix should be added.
Expired session not deleted from database
https://github.com/opencart/opencart/is ... -480609923

LE. Confirm the bug.
After clean install when you try to edit a product you get query error..

From product model this line should be removed

Code: Select all

$this->db->query("DELETE FROM " . DB_PREFIX . "seo_url WHERE query = 'product_id=" . (int)$product_id . "'");
Wrong code at getSeoUrls function

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE query = 'product_id=" . (int)$product_id . "'");
No more query in table

LE2. Same issue on Categories, Manufacturer

Crash when you try to add Download...

Attachments

Screenshot_2020-06-15_19-13-43.png

Screenshot_2020-06-15_19-13-43.png (37.02 KiB) Viewed 1135 times


OC 2.3.0.2 | OC 3.0.3.6 | Extensions converted by me | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by derzet » Tue Jun 16, 2020 12:16 am

straightlight wrote:
Mon Jun 15, 2020 11:57 pm
Which location do you encounter the query error? More information is needed.
route=catalog/product/edit

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by straightlight » Tue Jun 16, 2020 12:27 am

xxvirusxx wrote:
Mon Jun 15, 2020 11:59 pm
This fix should be added.
Expired session not deleted from database
https://github.com/opencart/opencart/is ... -480609923

LE. Confirm the bug.
After clean install when you try to edit a product you get query error..

From product model this line should be removed

Code: Select all

$this->db->query("DELETE FROM " . DB_PREFIX . "seo_url WHERE query = 'product_id=" . (int)$product_id . "'");
Wrong code at getSeoUrls function

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "seo_url WHERE query = 'product_id=" . (int)$product_id . "'");
No more query in table

LE2. Same issue on Categories, Manufacturer

Crash when you try to add Download...
Issue spotted. One line was missing but we do not remove it, we need to replace it with the new query line from the master branch. Will update the package shortly.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Tue Jun 16, 2020 3:54 am

Package updated.

- Fixed admin SEO URLs from old query field to key and value fields.
- Fixed the admin controller design seo URLs to pull the SEO URLs by keywords.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Tue Jun 16, 2020 8:52 am

Package updated.

- Removed extension/recurring from catalog account recurring files.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by derzet » Tue Jun 16, 2020 7:26 pm

several lines: (41, 80, 150, 190, 320)
in admin\model\catalog\category.php are calling getPath()
while the function on line 287 is named getPaths()

after trying to fix that, I'm getting

Code: Select all

mysqli::real_escape_string() expects parameter 1 to be string, array given in system/library/db/mysqli.php on line 45
thrown from line 320 and getPaths() returning in fact more than one row

no idea what was intended here ... maybe another getPath() is really missing...

Newbie

Posts

Joined
Sat Jun 06, 2020 11:17 pm

Post by straightlight » Tue Jun 16, 2020 7:30 pm

In admin/model/catalog/category.php file, find:

Code: Select all

public function getPaths($category_id) {
add above:

Code: Select all

public function getPath($category_id) {
		return implode('_', array_column($this->getPaths($category_id), 'path_id'));
	}
See if that fixes the issue.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Tue Jun 16, 2020 7:40 pm

Package re-uploaded.

- Fixed the admin catalog category model with getPath method.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by straightlight » Tue Jun 16, 2020 8:04 pm

- Fixed admin/view/template/sale/order_form.twig where custom_field.value would show with ? instead of : operator with shipping.

This commit also is the case for the master branch: https://github.com/opencart/opencart/pu ... ff902d7fe8 .

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by cyclops12 » Tue Jun 16, 2020 8:07 pm

cyclops12 wrote:
Tue Jun 09, 2020 1:41 am

Plus you cannot edit any of the four information pages in Catalog/information (About Us, Delivery etc) as it comes up with this error

Code: Select all

Notice: Undefined property: Proxy::getInformationDescriptions in C:\xampp\htdocs\oc3.0.3.4\admin\controller\catalog\information.php on line 76
still cannot edit these information pages in admin
in both feature and core pre releases

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 4 guests