Cannot change user slug
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?Yes, I changed the name/url in the config file along with on the back end of course.
I also deleted the old logo and uploaded the new one but the logo in emails remains broken with the name of the previous site still in the url.I searched the DB and tries to hard code the new url but that didn't work for emails at least.
I searched all of the files to be safe and find nothing for the old url so I don't know where this is coming from.Not sure what else to look at which is why I posted.
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?This is where the email template is rendered, you can add a console.log(params) there to see the values used for the logo.
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?Yes but I don't want to edit files directly as there are so many nodebb updates that will overwrite changes.
In addition, I never had to edit this file to get the logo working in emails so I'm very hesitant about touching that. -
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?You are just editing it to debug the issue, once you see the correct url there you can revert the change back.
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?Ok, I can try that.
Making this change worked;
Emailer._defaultPayload = {
url: nconf.get('url'),
site_title: meta.config.title || 'NodeBB',
logo: {
src: "https://my.nodebb.com/assets/uploads/system/site-logo.png",
height: 50,
width: 247,
},
};I also tried this with no luck.
nodebb> db.objects.find({ _key: "meta/config" }).pretty()
...nodebb> db.objects.find({ _key: "meta/config" }, { logo: 1, _id: 0 }).pretty()
...nodebb>
This confirmed that the meta/config document currently does not exist in the database.
db.objects.insertOne({
_key: "meta/config",
logo: "https://my.nodebb.com/assets/uploads/system/site-logo.png"
})Rebuilt and restarted NodeBB
./nodebb build
./nodebb restartNo change.
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?The key name is just
config
notmeta/config
-
I have to rename a user but after doing that, their posts under the old name still shows up and the username still shows the old user.
Is there a way to fix this?Ok but either way, I can't customize this page that will get overwritten so how can I get this to work? More importantly, why is it not working since it worked before the domain name change.
-
Ok but either way, I can't customize this page that will get overwritten so how can I get this to work? More importantly, why is it not working since it worked before the domain name change.
NodeHam regarding the user name change, are you sure it worked? Can you access the user via their new username?
-
Yes, I can log in and out, post as the renamed user.
-
Yes, I can log in and out, post as the renamed user.
NodeHam sounds like a varnish cache issue...