Reminder: Change Magento`s default phone numbers and callouts before site launch"を消す方法

こちらのフォーラムに解決法が書いてありました。
http://www.magentocommerce.com/boards/viewthread/246247/

This is a Magento bug, both with the notification rss feeds, and the logic behind checking whether Magento already has downloaded them or not. You can check the feeds manually here: http://notifications.magentocommerce.com/community/notifications.rss - and you’ll notice most of them have xml tags, in particular the ‘link’ tag. However, the annoying reminder “Reminder: Change Magento`s default phone numbers and callouts before site launch” does not have a link value, which is the problem.

When a feed is updated in the database, table ‘adminnotification_inbox’, the columns ‘is_read’, ‘is_remove’ and ‘url’ are updated. In the annoying message case, the ‘url’ column is updated with NULL (or left as empty if the message has not been touched). The code iterates through all feed items, and looks in the database if it has an item already based on it’s url. If the url matches it will not be inserted into the database. However, in this case, the url is NULL so the code fails and the same notification is inserted into the table.

要はMagentoのバグということです。

3ステップで解決!

1. コードを編集

/app/code/local/Mage/AdminNotification/Model/Resource/Inbox.php を開き、102行目にある下記のコードを探します。

$select = $adapter->select()
->from($this->getMainTable())
->where('url=?', $item['url']);

これを下記のように変更します。

$select = $adapter->select()
->from($this->getMainTable())
->where('url=? OR url IS NULL', $item['url'])
->where('title=?', $item['title']);

2. Notificationを削除

System -> Notifications をクリックします。
magento_bug1

ここで全てのNotificationsにチェックを入れて、ActionsでRemoveを選択し、submitします。

3. cacheをクリアします

System -> Cache Management をクリックします。
magento_bug2

ここで左下にあるオレンジのボタンを押下します。念のため二つとも押しておきましょう。

以上で修正完了です。いったんログアウトして、再ログインしてみましょう。Notificationのポップアップが出なくなったと思います。


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

© 2025 みる米技術部 Powered by AFFINGER5