Skip to content

Issues getting Flarum to work on new host

Solved Configure

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation💗

  • 3 Votes
    30 Posts
    372 Views

    @DownPW any update?

  • 0 Votes
    17 Posts
    364 Views

    @DownPW anytime

  • NodeBB: Favicon upload issue

    Solved Configure
    12
    3 Votes
    12 Posts
    351 Views

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!

  • Issues with v3 alpha and Harmony

    Moved Solved Configure
    18
    4 Votes
    18 Posts
    399 Views

    @cagatay Should be all sorted now 🙂
    Don’t forget to put your language back to Turkish.

  • 5 Votes
    13 Posts
    473 Views
    'use strict'; const winston = require('winston'); const user = require('../user'); const notifications = require('../notifications'); const sockets = require('../socket.io'); const plugins = require('../plugins'); const meta = require('../meta'); module.exports = function (Messaging) { Messaging.notifyQueue = {}; // Only used to notify a user of a new chat message, see Messaging.notifyUser Messaging.notifyUsersInRoom = async (fromUid, roomId, messageObj) => { let uids = await Messaging.getUidsInRoom(roomId, 0, -1); uids = await user.blocks.filterUids(fromUid, uids); let data = { roomId: roomId, fromUid: fromUid, message: messageObj, uids: uids, }; data = await plugins.hooks.fire('filter:messaging.notify', data); if (!data || !data.uids || !data.uids.length) { return; } uids = data.uids; uids.forEach((uid) => { data.self = parseInt(uid, 10) === parseInt(fromUid, 10) ? 1 : 0; Messaging.pushUnreadCount(uid); sockets.in(`uid_${uid}`).emit('event:chats.receive', data); }); if (messageObj.system) { return; } // Delayed notifications let queueObj = Messaging.notifyQueue[`${fromUid}:${roomId}`]; if (queueObj) { queueObj.message.content += `\n${messageObj.content}`; clearTimeout(queueObj.timeout); } else { queueObj = { message: messageObj, }; Messaging.notifyQueue[`${fromUid}:${roomId}`] = queueObj; } queueObj.timeout = setTimeout(async () => { try { await sendNotifications(fromUid, uids, roomId, queueObj.message); } catch (err) { winston.error(`[messaging/notifications] Unabled to send notification\n${err.stack}`); } }, meta.config.notificationSendDelay * 1000); }; async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; } if (roomId != 11) { // 5 Is the ID of the ID of the global chat room. Messaging.getUidsInRoom(roomId, 0, -1); // Proceed as normal. } else { user.getUidsFromSet('users:online', 0, -1); // Only notify online users. } const { displayname } = messageObj.fromUser; const isGroupChat = await Messaging.isGroupChat(roomId); const notification = await notifications.create({ type: isGroupChat ? 'new-group-chat' : 'new-chat', subject: `[[email:notif.chat.subject, ${displayname}]]`, bodyShort: `[[notifications:new_message_from, ${displayname}]]`, bodyLong: messageObj.content, nid: `chat_${fromuid}_${roomId}`, from: fromuid, path: `/chats/${messageObj.roomId}`, }); delete Messaging.notifyQueue[`${fromuid}:${roomId}`]; notifications.push(notification, uids); } };
  • 1 Votes
    2 Posts
    249 Views

    @Hari I think you’re referring to this

    https://sudonix.com/topic/170/creating-posts-from-rss-feeds-in-flarum

    However, this code was never designed to work with WordPress, but you could leverage the WP-CLI to do something similar without too much effort.

  • 0 Votes
    3 Posts
    247 Views

    See https://sudonix.com/topic/226/issues-getting-flarum-to-work-on-new-host/28?_=1645013723672

  • Email issue (virturalmin)

    Solved Hosting
    5
    0 Votes
    5 Posts
    321 Views

    @gotwf said in Email issue (virturalmin):

    @jac Typically you want your domain’s MX records to point to FQDN server name, e.g. foo.example.eg

    % drill stockportcounty.fans mx ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 63911 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN MX ;; ANSWER SECTION: stockportcounty.fans. 600 IN MX 10 stockportcounty.fans.

    Yours do not. Although a bit more drillin’ and reverse lookup indicates thusly;

    % drill stockportcounty.fans ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 160 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; stockportcounty.fans. IN A ;; ANSWER SECTION: stockportcounty.fans. 600 IN A 65.108.63.35 ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 127 msec ;; SERVER: 204.8.232.207 ;; WHEN: Sun Oct 10 19:37:02 2021 ;; MSG SIZE rcvd: 54 <kvg@loon:~>% drill -x 65.108.63.35 ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 57802 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; 35.63.108.65.in-addr.arpa. IN PTR ;; ANSWER SECTION: 35.63.108.65.in-addr.arpa. 86400 IN PTR vps.stockportcounty.fans.

    I think you probably want your mx record to point to vps.stockportcountry.fans.

    It is important for forward and reverse lookups for MX records jive. Maybe you are looking like a spammer in that they do not?

    Edit: But at least you have a reverse record, many spammers do not, so that is a big red flag.

    Thanks for the advice, will look into it all later once back home.