إشعارات المستخدم "الكل" فارغة، لكن الردود والإعجابات وما إلى ذلك تحتوي على عناصر

I got a report that a user’s notifications would load when clicking on the avatar. (It’s a recent upgrade running 2.4.0.beta10). There is a single non-standard plugin, but it doesn’t seem likely to be the cause and the issue is affecting only one user (at least that we know of). (And then I did an upgrade without my plugin and that didn’t fix it.) safe-mode didn’t help.

When going to /u/username/notifications for one particular user no notifications are shown, but clicking on “responses”, “likes” and so on shows items in each of those types of notifications. I went into psql and did a reindex table notifications without error.

Clicking the avatar gets this error in the javascript console:

_application-4715c32620ba9b83af00144510f68ca0f0bae8f745edf2339e3f249ceee88c3f.js:77240 Uncaught TypeError: Cannot read property 'dasherize' of undefined

Looking at the code,

      return [this.attach(notificationName.dasherize() + "-notification-item", attrs, {}, { fallbackWidgetName: "default-notification-item" }), (0, _virtualDom.h)("span.time", (0, _node.dateNode)(attrs.created_at))];

it appears to me (and this could be wildly off base) that the issue is that it’s getting an error or nil/null/empty when getting the notifications?

I can get the user notifications in rails without incident:

 pry(main)> Notification.where(user_id: 870).count
=> 372
# this also returns stuff:
u=User.find(870)
Notification.recent_report(u)

I’m out of ideas.

@pfaffman هل تمكّنت من حل هذه المشكلة؟ أنا أيضًا أواجه نفس المشكلة.

عذراً. لا أتذكر إن كنت قد أصلحتها أم أنها لا تزال معطلة، ولا أتذكر مكانها أيضاً. :man_shrugging:

حسناً، لقد جربتُ حتى الآن كل شيء: أزلتُ جميع الإضافات غير الرسمية، وأزلتُ Cloudflare، وأعدتُ البناء عدة مرات… ومسحتُ ذاكرة المتصفح… لكن المشكلة لا تزال مستمرة لبعض المستخدمين، ولا تظهر على نفس الجهاز لمستخدمين آخرين. ورسالة الخطأ التي أراها مطابقة تماماً لرسالتك. ثم جربتُ هاتفي المحمول وعمل كل شيء. أظنّ هذا هو السبب في أنك لا تتذكر إصلاحها. لستُ متأكداً مما إذا كان السبباً هو أحد الإضافات أم أنها مشكلة محلية في الجهاز فقط. آمل أن تكون المشكلة حصرية على سطح المكتب الخاص بي :slight_smile:

هل يحدث ذلك مع إزالة جميع ملحقات المتصفح (وضع التصفح المتخفي)؟

نعم، يحدث الأمر أيضًا في وضع التصفح المتخفي، لكن ليس بنفس التكرار. ربما يكون القرص الصلب مسؤولاً عن ذلك، وقد يختلف حجم التخزين المستخدم والحد المخصص. إليك لقطة شاشة من وضع التصفح المتخفي. لا ينبغي أن أقلق بشأن هذه المشكلة إذا كانت تحدث فقط على جهازي :thinking:

@pfaffman إعادة تثبيت إضافة discourse-follow حلّت المشكلة بالنسبة لي :slight_smile: