Object #<Object> has no method 'indexOf'
-
Looks like ogImageUrl is set to an object where it should just be a string. Do you have a profile image plugin or something? I'm guessing a plugin is setting
postAtIndex.user.picture
to{ email: '[email protected]' }
which is causing the crash. -
@baris
No, im not using any avatar profile img plugin...Those are the ones installed and running:
- nodebb-widget-essentials - nodebb-plugin-cards - nodebb-plugin-composer-default - nodebb-plugin-dbsearch - nodebb-plugin-desktop-notifications - nodebb-plugin-emailer-mailgun - nodebb-plugin-google-analytics - nodebb-plugin-markdown - nodebb-plugin-recent-cards - nodebb-plugin-rss - nodebb-plugin-soundpack-default - nodebb-plugin-spoilers - nodebb-plugin-sso-google - nodebb-rewards-essentials - nodebb-plugin-sso-facebook - nodebb-plugin-mentions - nodebb-plugin-custom-pages
-
{ email: '[email protected]' } { _key: undefined, pid: 931, uid: 466, tid: 286, content: '<ul>\n<li>O plano não funciona, o planejamento sim, os projetos hoje em dia não permitem que fiquemos apenas na divagação de “fazer planos”, que na maioria dos casos não serão implementadas. Tudo começa pela definição dos objetivos que não.........., timestamp: 1447772189409, reputation: 0, votes: 0, editor: null, edited: 0, deleted: false, relativeTime: '2015-11-17T14:56:29.409Z', relativeEditTime: '', index: 0, user: { _key: undefined, username: 'Oscar Correia', userslug: 'oscar-correia', email: undefined, picture: { email: '[email protected]' }, fullname: '', signature: '', uploadedpicture: undefined, reputation: -3, postcount: 9, banned: false, ..... }, favourited: false, upvoted: false, downvoted: false, selfPost: false, display_moderator_tools: true, display_move_tools: false }
-
@Leonardo-Galani said:
picture: { email: '[email protected]' },
Shouldn't be an object, not sure why it's set to one though.
Run
grep -R "filter:user.getPicture" node_modules/
in your nodebb folder and see if there are any matches. -
No matches
-
Then I am officially out of ideas, you can set those users picture and uploaded picture property to an empty string through mongodb, and let them set their picture again.
See if that helps. I also added a check on master that should prevent the crash, but it still doesn't explain the issue of the picture property being an object.
-
@baris Maybe it's an SSO issue? Something like the SSO is returning an object for the image instead of a link to the image?
-
@pitaj Yeah that makes sense I checked the sso-facebook and google plugins, they are saving the picture field but there are no checks if the data is a string or object.
nodebb-plugin-sso-google/library.js at master · julianlam/nodebb-plugin-sso-google
NodeBB Plugin that allows users to login/register via their Google account. - nodebb-plugin-sso-google/library.js at master · julianlam/nodebb-plugin-sso-google
GitHub (github.com)
-
@baris yeah I'm thinking it's Facebook since the given email is a hotmail address.
-
He used to have a image ( this user ) .. i will try to add something and delete to check it.
-
@Leonardo-Galani YEP... avatar removed.. and post now working fine...