shop2.8.19バージョンアップでエラー 投稿する

投稿者:kamo  投稿日時:2023-05-01 01:23:02
SOY CMS 3.11.34 にして PHP 8.0.2に変更後Shopを2.8.19にアップしたところ、以下のエラーがでました。
---------------
Fatal error: Uncaught TypeError: soy2_unserialize(): Argument #1 ($string) must be of type string, null given, called in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/domain/shop/SOYShop_Item.class.php on line 242 and defined in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php:9201 Stack trace: #0 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/domain/shop/SOYShop_Item.class.php(242): soy2_unserialize(NULL) #1 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/domain/shop/SOYShop_Item.class.php(250): SOYShop_Item->getConfigObject() #2 /home/xsv/hi***.com/public_html/sycms/soyshop/webapp/src/module/site/common/output_item.php(107): SOYShop_Item->getAttribute('list_price') #3 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/site/classes/SOYShop_ItemListComponent.class.php(31): soyshop_output_item(Object(SOYShop_ItemListComponent), Object(SOYShop_Item), NULL) #4 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(6809): SOYShop_ItemListComponent->populateItem(Object(SOYShop_Item), NULL, -1, 28) #5 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(6774): HTMLList->populateItemImpl(Object(HTMLList_DummyObject), NULL, -1, 28) #6 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/site/classes/SOYShop_ItemListComponent.class.php(17): HTMLList->execute() #7 /home/xshiserv/hi-serv.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(7003): SOYShop_ItemListComponent->execute() #8 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(7021): HTMLPage->add('itemALL', Object(SOYShop_ItemListComponent)) #9 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/site/pages/SOYShop_ComplexPageBase.class.php(23): HTMLPage->createAdd('itemALL', 'SOYShop_ItemLis...', Array) #10 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/controller/output.php(18): SOYShop_ComplexPageBase->build(Array) #11 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/SOYShopSiteController.class.php(78): output_page('_home', Array, Object(SOYShop_Page)) #12 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(236): SOYShopSiteController->execute() #13 /home/xs/hi***.com/public_html/shop/index.php(8): SOY2PageController::run() #14 {main} thrown in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php on line 9201
---------------------------
FTPでファイルをアップしているときに
257 "/hi***.com/public_html/sycms/soyshop" is the current directory
キャッシュされているファイルリストを使用します。

421 Idle timeout (600 seconds): closing control connection

------------となったのですが、これが原因でしょうか?
また、Shop管理画面からログインしようとすると
Fatal error: Uncaught Error: Non-static method SOYShopAuthUtil::_authes() cannot be called statically in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/util/SOYShopAuthUtil.class.php:27 Stack trace: #0 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/SOYShopPageController.class.php(13): SOYShopAuthUtil::setAuthConstant() #1 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(236): SOYShopPageController->execute() #2 /home/xs/hi***.com/public_html/sycms/soyshop/index.php(3): SOY2PageController::run() #3 {main} thrown in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/util/SOYShopAuthUtil.class.php on line 27
Fatal error: Uncaught Error: Undefined constant "AUTH_OPERATE" in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/layout/error.php:88 Stack trace: #0 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/conf/common.conf.php(121): include_once() #1 [internal function]: soyshop_shutdown() #2 {main} thrown in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/layout/error.php on line 88
となって画面表示もできていない状態です。
CMSの方は正常に表示できています。

ご多忙のところ恐縮ですが、対応方法をお教えください。
どうぞよろしくお願いいたします。
投稿者:齋藤毅  投稿日時:2023-05-01 05:12:33
SOY Shopの方で現在配布されているバージョンでは、今回のエラーは修正されています。
FTPの転送エラーではないでしょうか?
投稿者:kamo  投稿日時:2023-05-01 08:21:31
アドバイスありがとうございます。
FTPソフトを変更してファイルをアップし直しましたら、管理画面が正常に表示できました。
ただ、ページはエラーが出て表示できていません。
Warning: Trying to access array offset on value of type null in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/module/plugins/parts_entry_import/soyshop.site.beforeoutput.php on line 21

Fatal error: Uncaught Error: Class "Entry" not found in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/module/plugins/parts_entry_import/component/EntryListComponent.class.php:16 Stack trace: #0 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(6809): EntryListComponent->populateItem(Object(HTMLList_DummyObject), NULL, -1, 0) #1 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(6774): HTMLList->populateItemImpl(Object(HTMLList_DummyObject), NULL, -1, 0) #2 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(7003): HTMLList->execute() #3 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(7021): HTMLPage->add('entry_list', Object(EntryListComponent)) #4 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/module/plugins/parts_entry_import/soyshop.site.beforeoutput.php(33): HTMLPage->createAdd('entry_list', 'EntryListCompon...', Array) #5 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/logic/plugin/extensions/soyshop.site.beforeoutput.php(30): EntryImportBeforeOutput->beforeOutput(Object(_home_page)) #6 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(8685): SOYShopSiteBeforeOutputDelegateAction->run('soyshop.site.be...', 'parts_entry_imp...', Object(EntryImportBeforeOutput)) #7 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/controller/output.php(40): SOY2Plugin::invoke('soyshop.site.be...', Array) #8 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/base/SOYShopSiteController.class.php(77): output_page(Object(_home_page)) #9 /home/xs/hi***.com/public_html/sycms/soyshop/webapp/lib/soy2_build.php(236): SOYShopSiteController->execute() #10 /home/xs/hi***.com/public_html/shop/index.php(8): SOY2PageController::run() #11 {main} thrown in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/module/plugins/parts_entry_import/component/EntryListComponent.class.php on line 16
まだ、FTPでの転送ファイルがおかしいところがあるでしょうか?
投稿者:kamo  投稿日時:2023-05-01 08:37:12
また、soyshopのgitにあるファイル説明に
クレジットカード支払いモジュール等の後から設置したモジュールを利用している場合は、
モジュールの管理画面やモジュールからHTMLが出力されているページでエラーが発生することがあります
-----------と記載されていますが、
このショップは、e-SCOTT Smart決済モジュールを利用しています。
このファイルも直す場所がありますでしょうか?
投稿者:kamo  投稿日時:2023-05-01 09:51:18
soyshop.site.beforeoutput.phpの21行目は

$site = EntryImportUtil::getSite($config["siteId"])

SOY2::import("domain.cms.Entry");
$siteId = (isset($config["siteId"])) ? $config["siteId"] : null;
$site = EntryImportUtil::getSite($siteId);
上記のように修正すれば解消されます。
----とのメールでのアドバイスのとおりに変更したら
ページが表示できました。
ありがとうございました。
投稿者:kamo  投稿日時:2023-05-01 19:39:15
度々すみませんkamoです。
商品詳細ページにある「この商品のお問い合わせをする」リンクページが
エラーとなり、表示できていませんでした。
https://www.hi***.com/inquiryShop?item_id=37
	Fatal error: Uncaught Error: Undefined constant "SOY2_NOW" in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/domain/shop/SOYShop_Item.class.php:440 Stack trace: #0 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/src/columns/SOYShopColumn.class.php(29): SOYShop_Item->isPublished() #1 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/src/columns/SOYShopColumn.class.php(12): SOYShopColumn->_getItemName(37) #2 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/src/template/responsive2_dl-flex_shop1/form.php(42): SOYShopColumn->getForm() #3 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/page.php(313): include_once('/home/xs/...') #4 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/page.php(608): SOYInquiry_PageApplication->getForm('shopitemContact') #5 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(7005): SOYInquiry_FormComponent->execute() #6 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(7023): HTMLPage->add('soyinquiry', Object(SOYInquiry_FormComponent)) #7 /home/xs/hi***.com/public_html/sycms/app/webapp/inquiry/page.php(53): HTMLPage->createAdd('soyinquiry', 'SOYInquiry_Form...', Array) #8 /home/xs/hi***.com/public_html/sycms/app/base/CMSApplication.class.php(615): SOYInquiry_PageApplication->main(Object(CMSPage)) #9 /home/xs/hi***.com/public_html/sycms/common/site_include/component/CMSAppContainer.class.php(40): CMSApplication::page(Object(CMSPage), Array) #10 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(5364): CMSAppContainer->getObject() #11 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(7296): SOY2HTML->set('apps', Object(CMSAppContainer), Array) #12 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(7006): HTMLPage->set('apps', Object(CMSAppContainer)) #13 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(7023): HTMLPage->add('apps', Object(CMSAppContainer)) #14 /home/xs/hi***.com/public_html/sycms/common/site_include/CMSPage.class.php(145): HTMLPage->createAdd('apps', 'CMSAppContainer', Array) #15 /home/xs/hi***.com/public_html/sycms/common/site_include/CMSPageController.class.php(138): CMSPage->main() #16 /home/xs/hi***.com/public_html/sycms/common/lib/soy2_build.php(236): CMSPageController->execute() #17 /home/xs/hi***.com/public_html/sycms/common/site_include/SOYCMSOutputContents.class.php(64): SOY2PageController::run() #18 /home/xs/hi***.com/public_html/sycms/common/site_include/SOYCMSOutputContents.class.php(110): SOYCMSOutputContents::execute_normal() #19 /home/xs/hi***.com/public_html/sycms/common/site.func.php(42): SOYCMSOutputContents->execute() #20 /home/xs/hi***.com/public_html/website/index.php(12): execute_site() #21 /home/xs/hi***.com/public_html/index.php(3): include_once('/home/xs/...') #22 {main} thrown in /home/xs/hi***.com/public_html/sycms/soyshop/webapp/src/domain/shop/SOYShop_Item.class.php on line 440
CMSページに「この商品のお問い合わせをする」用ページは、
リンクでなく単体ページとして表示するとそちらはフォームページが表示できます。

バージョンアップ前は、リンクが表示できていたと思います。
ご多忙のところ恐縮ですが、対応方法をお教えください。
どうぞよろしくお願いいたします。
投稿者:齋藤毅  投稿日時:2023-05-02 05:21:43
添付ファイルにあります該当する箇所のコードを

function isPublished(){
	if(
		$this->isOpen > 0 &&
		$this->getOpenPeriodStart() <= SOY2_NOW &&
		$this->getOpenPeriodEnd() >= SOY2_NOW
	){
		return true;
	}

	return false;
}

function isPublished(){
	if(!defined("SOY2_NOW")) define("SOY2_NOW", time());
	if(
		$this->isOpen > 0 &&
		$this->getOpenPeriodStart() <= SOY2_NOW &&
		$this->getOpenPeriodEnd() >= SOY2_NOW
	){
		return true;
	}

	return false;
}
に変更すれば良いです
投稿者:kamo  投稿日時:2023-05-02 09:03:20
kamoです。
お教えいただいたように変更したところ、表示ができるようになりました。
大変お手数をお掛けしました。
ありがとうございました。
ログインして投稿する