big problem after update

Phoca Cart - complex e-commerce extension
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

big problem after update

Post by Angelo.pe »

Hello guys, I'm new to this forum.
I have Joomla last version and quick-start package with all demos of Phoca component (for me very very important), by Joomlaforest.
In this package, the Phoca version was 3.06 and so, I updated at last version.
But now I have a problem. this the message in the admin panel

Code: Select all

Attenzione

JInstaller: :Install: Can't find Joomla XML setup file.
JInstaller: :Install: Can't find XML setup file.
JInstaller: :Install: Error SQL Duplicate column name 'active_quantity'
Extension Update: SQL error processing query: DB function failed with error number 1060 
Duplicate column name 'active_quantity'
SQL =
ALTER TABLE `#__phocacart_shipping_methods` ADD COLUMN `active_quantity` tinyint(1) NOT NULL DEFAULT '0';
Package Update: There was an error installing an extension: com_phocacart_v3.5.0.zip
while in the public panel all the link with demos are down and there is this message:
1054 Unknown column 'c.metatitle' in 'field list'
The debug panel show this:

Code: Select all

Call stack
#	Function	Location
1	()	JROOT/libraries/joomla/database/driver/mysqli.php:665
2	JDatabaseDriverMysqli->execute()	JROOT/libraries/joomla/database/driver.php:1701
3	JDatabaseDriver->loadObjectList()	JROOT/libraries/src/MVC/Model/BaseDatabaseModel.php:308
4	Joomla\CMS\MVC\Model\BaseDatabaseModel->_getList()	JROOT/components/com_phocacart/models/category.php:93
5	PhocaCartModelCategory->getCategory()	JROOT/components/com_phocacart/views/category/view.html.php:136
6	PhocaCartViewCategory->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:672
7	Joomla\CMS\MVC\Controller\BaseController->display()	JROOT/components/com_phocacart/controller.php:43
8	PhocaCartController->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:710
9	Joomla\CMS\MVC\Controller\BaseController->execute()	JROOT/components/com_phocacart/phocacart.php:14
10	require_once()	JROOT/libraries/src/Component/ComponentHelper.php:402
11	Joomla\CMS\Component\ComponentHelper::executeComponent()	JROOT/libraries/src/Component/ComponentHelper.php:377
12	Joomla\CMS\Component\ComponentHelper::renderComponent()	JROOT/libraries/src/Application/SiteApplication.php:194
13	Joomla\CMS\Application\SiteApplication->dispatch()	JROOT/libraries/src/Application/SiteApplication.php:233
14	Joomla\CMS\Application\SiteApplication->doExecute()	JROOT/libraries/src/Application/CMSApplication.php:196
15	Joomla\CMS\Application\CMSApplication->execute()	JROOT/index.php:49
Please, I need your help!!!!! Thank you so much!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: big problem after update

Post by Jan »

Hi, it seems there was some error on your site when upgrading Phoca Cart.

Version 3.5.0 tried to add active_quantity to database but such column existed there.

When missing c.metatitle column in database, such needs to be added manually.

Unfortunately, there are some few ways to fix it and the problem is, in fact it has nothing to do with the component self as the component is installed by Joomla! extension manager:

- you can uinstall and install it again - from scratch - BE AWARE within this method, all current data will be lost
- if you cannot uinstall it because of not losing the data, you should open your database e.g. with help of phpMyAdmin, open the folder: administrator\components\com_phocacart\update\sql\mysql\ and there you can see each SQL quieries for update.

So if some column is missing in your database, you can search the sql query here and add it.

Regarding c.metatitle - this column was added in times where there was not stable version of Phoca Cart (between RC8 and RC9)

Code: Select all

-- ---------
-- RC8 -> RC9
-- ---------
-- ALTER TABLE  `#__phocacart_categories` 		ADD `metatitle` varchar(255) NOT NULL DEFAULT '';
which means, you can find the update query here: administrator\components\com_phocacart\install\sql\mysql\install.utf8.sql

change #__ to your database prefix.

But if your Phoca Cart instance does not include a column, which was added before Phoca Cart was stable (2017) this also can mean, there will be a lot of another problems :idea: as this seems like more that dozens of previous stable versions including their updates are missing on your site.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

Re: big problem after update

Post by Angelo.pe »

Hi Jan and thank you for your message.
I tried to uninstall the old package and install the last version.
There is a problem. The system told me that this is impossible.
This is the message

Code: Select all

JFolder: :delete: Path is not a folder. Path: /home/uynfyyqu/domains/xxxx.biz/public_html/administrator/components/com_phocacart
JFolder: :delete: Path is not a folder. Path: /home/uynfyyqu/domains/xxxx.biz/public_html/components/com_phocacart
Component Uninstall: Can't uninstall. Please remove manually.
But I don't see any files or folder by ftp. :-(
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

Re: big problem after update

Post by Angelo.pe »

if I try to install the last version I have this message

Code: Select all

JInstaller: :Install: Error SQL Unknown column 'orders_view_display' in 'field list'
Extension Install: SQL error processing query: DB function failed with error number 1054 
Unknown column 'orders_view_display' in 'field list'
SQL =
INSERT INTO `#__phocacart_order_statuses` (`id`, `title`, `published`, `ordering`, `stock_movements`, `type`, `download`, `change_user_group`, `change_points_needed`, `change_points_received`, `orders_view_display`) VALUES
(1, 'COM_PHOCACART_STATUS_PENDING', '1', '1', '-', '1', '0', '0', '1', '0', '[1]'),
(2, 'COM_PHOCACART_STATUS_CONFIRMED', '1', '2', '=', '1', '0', '1', '1', '1', '[1,3]'),
(3, 'COM_PHOCACART_STATUS_CANCELED', '1', '3', '+', '1', '0', '1', '2', '2', '[1]'),
(4, 'COM_PHOCACART_STATUS_SHIPPED', '1', '4', '=', '1', '0', '1', '1', '1', '[1,2,3]'),
(5, 'COM_PHOCACART_STATUS_REFUNDED', '1', '5', '=', '1', '0', '1', '2', '2', '[1]'),
(6, 'COM_PHOCACART_STATUS_COMPLETED', '1', '6', '=', '1', '1', '1', '1', '1', '[1,2,3]');
Package Install: There was an error installing an extension: com_phocacart_v3.5.0.zip
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

Re: big problem after update

Post by Angelo.pe »

Hi Jan, I founded the solution.
Through FTP I uploaded all the old Phoca cart CR6 component files and then deleted them.
Then I installed the latest version and now, it seems, everything is fine.
Unfortunately, the links and examples I had, have been lost.

Now, with the new package, when I made a new product in the wizard to set, the system shows:
1054 Unknown column 'a.download_days' in 'field list'

Nice weekend,
Angelo
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9451
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: big problem after update

Post by Benno »

Hi,
run this query:

Code: Select all

ALTER TABLE `#__phocacart_order_downloads` ADD COLUMN `download_days` int(11) NOT NULL DEFAULT '-1';
Change #_ to your table prefix before!

Kind regards,
Benno
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

Re: big problem after update

Post by Angelo.pe »

Thanks, Benno,
Thank you for your help.
I changed the prefix with the name of the table and sent the command.
Now there's a window open.
How should I proceed?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: big problem after update

Post by Jan »

Hi, what do you mean with "window open". Is even your server ready for Joomla!? Which version of Joomla! do you use? Mostly all these queries are installed automatically by Joomla! extension manager without any such issues :idea: ... The problem is, these are much more question on Joomla! itsefl than on Phoca extensions because Phoca extensions do not install themeselves, they are all installed by Joomla! extension manager which manages all the information about updates, etc. :idea: But seems on your site, such information were broken.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 140
Joined: 02 May 2020, 12:42

Re: big problem after update

Post by Angelo.pe »

Hello, Jan I'm using the last version of Joomla. my server is host.it.
the problem is that I cannot create a new product because I get the error message " 1054 Unknown column 'a.download_days' in 'field list'".
If I duplicate an existing product (one of the "example products"), the system works.
If I create a category, it works, and so on. It seems that the problem is limited to creating new products.
With debugging activated, I have this message:

Code: Select all

/home/xxxxxxx/domains/castaldi.biz/public_html/libraries/joomla/database/driver/mysqli.php:665
This is the Call stack

Code: Select all

#	Function	Location
1	()	JROOT/libraries/joomla/database/driver/mysqli.php:665
2	JDatabaseDriverMysqli->execute()	JROOT/libraries/joomla/database/driver.php:1506
3	JDatabaseDriver->loadAssocList()	JROOT/administrator/components/com_phocacart/libraries/phocacart/file/additional.php:29
4	PhocacartFileAdditional::getProductFilesByProductId()	JROOT/administrator/components/com_phocacart/models/phocacartitem.php:96
5	PhocaCartCpModelPhocaCartItem->getItem()	JROOT/libraries/src/MVC/View/HtmlView.php:425
6	Joomla\CMS\MVC\View\HtmlView->get()	JROOT/administrator/components/com_phocacart/views/phocacartitem/view.html.php:25
7	PhocaCartCpViewPhocaCartItem->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:672
8	Joomla\CMS\MVC\Controller\BaseController->display()	JROOT/administrator/components/com_phocacart/controller.php:86
9	phocaCartCpController->display()	JROOT/libraries/src/MVC/Controller/BaseController.php:710
10	Joomla\CMS\MVC\Controller\BaseController->execute()	JROOT/administrator/components/com_phocacart/phocacart.php:19
11	require_once()	JROOT/libraries/src/Component/ComponentHelper.php:402
12	Joomla\CMS\Component\ComponentHelper::executeComponent()	JROOT/libraries/src/Component/ComponentHelper.php:377
13	Joomla\CMS\Component\ComponentHelper::renderComponent()	JROOT/libraries/src/Application/AdministratorApplication.php:101
14	Joomla\CMS\Application\AdministratorApplication->dispatch()	JROOT/libraries/src/Application/AdministratorApplication.php:159
15	Joomla\CMS\Application\AdministratorApplication->doExecute()	JROOT/libraries/src/Application/CMSApplication.php:196
16	Joomla\CMS\Application\CMSApplication->execute()	JROOT/administrator/index.php:51
What should I do?
Following Benno, I went to the phpAdmin.. isn't?
I selected the DB and I inserted the query "alter table...."
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9451
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: big problem after update

Post by Benno »

Hi,
Following Benno, I went to the phpAdmin.. isn't?
I selected the DB and I inserted the query "alter table...."
Yes, but backup your database first!
Change table prefix,
copy and paste the query insite phpMyAdmin,
press 'Go' Button.
Image

Kind regards,
Benno
Post Reply