@Jarvis_Johnson Have you had a chance to play with the new top bar? I’m getting a prerender error whenever I try to enable it. I’ve not been around long enough to follow the development process that resulted in the new top bar - any light you can shed?
ERROR in SERVER PRERENDERING
when prerendering TopbarApp with props: {"logo":{"href":"/","text":"Name","image":null,"image_highres":null},"search":{"search_placeholder":null,"mode":"keyword"},"search_path":"/","menu":{"links":[{"link":"/","title":"Home","priority":-1},{"link":"/en/infos/about","title":"About","priority":0},{"link":"/en/user_feedbacks/new","title":"Contact us","priority":1},{"link":"/en/invitations/new","title":"Invite new members","priority":2}],"limit_priority_links":null},"locales":{"current_locale_ident":"en","current_locale":"en","available_locales":[{"locale_name":"English","locale_ident":"en","change_locale_uri":"/change_locale?locale=en\u0026redirect_uri=admin%2Fnew_layout"}]},"avatarDropdown":{"avatar":{"image":null,"givenName":"D","familyName":"D"}},"newListingButton":{"text":"Post a new listing"},"i18n":{"locale":"en","defaultLocale":"en"},"marketplace":{"marketplace_color1":"#4a90e2","location":"/en/admin/new_layout"},"user":{"loggedInUsername":"user","isAdmin":true},"unReadMessagesCount":0}
js_code was:
(function() {
var railsContext = {"inMailer":false,"i18nLocale":"en","i18nDefaultLocale":"en","href":"url","location":"/en/admin/new_layout","scheme":"http","host":"url","port":null,"pathname":"/en/admin/new_layout","search":null,"httpAcceptLanguage":"en-GB,en-US;q=0.8,en;q=0.6","marketplaceId":1,"loggedInUsername":"blaked","marketplace_color1":"#4a90e2","marketplace_color2":"#2ab865","serverSide":true};
var props = {"logo":{"href":"/","text":"name","image":null,"image_highres":null},"search":{"search_placeholder":null,"mode":"keyword"},"search_path":"/","menu":{"links":[{"link":"/","title":"Home","priority":-1},{"link":"/en/infos/about","title":"About","priority":0},{"link":"/en/user_feedbacks/new","title":"Contact us","priority":1},{"link":"/en/invitations/new","title":"Invite new members","priority":2}],"limit_priority_links":null},"locales":{"current_locale_ident":"en","current_locale":"en","available_locales":[{"locale_name":"English","locale_ident":"en","change_locale_uri":"/change_locale?locale=en\u0026redirect_uri=admin%2Fnew_layout"}]},"avatarDropdown":{"avatar":{"image":null,"givenName":"D","familyName":"D"}},"newListingButton":{"text":"Post a new listing"},"i18n":{"locale":"en","defaultLocale":"en"},"marketplace":{"marketplace_color1":"#4a90e2","location":"/en/admin/new_layout"},"user":{"loggedInUsername":"D","isAdmin":true},"unReadMessagesCount":0};
return ReactOnRails.serverRenderReactComponent({
name: 'TopbarApp',
domNodeId: 'topbar-container',
props: props,
trace: true,
railsContext: railsContext
});
})()
console messages:
<script>
console.log.apply(console, ["[SERVER] RENDERED TopbarApp to dom node with id: topbar-container with railsContext:","{\"inMailer\":false,\"i18nLocale\":\"en\",\"i18nDefaultLocale\":\"en\",\"href\":\"http://url/en/admin/new_layout\",\"location\":\"/en/admin/new_layout\",\"scheme\":\"http\",\"host\":\"url\",\"port\":null,\"pathname\":\"/en/admin/new_layout\",\"search\":null,\"httpAcceptLanguage\":\"en-GB,en-US;q=0.8,en;q=0.6\",\"marketplaceId\":1,\"loggedInUsername\":\"blaked\",\"marketplace_color1\":\"#4a90e2\",\"marketplace_color2\":\"#2ab865\",\"serverSide\":true}"]);
console.error.apply(console, ["[SERVER] Exception in rendering!"]);
console.error.apply(console, ["[SERVER] message: touchClass is not defined"]);
console.error.apply(console, ["[SERVER] stack: ReferenceError: touchClass is not defined\n at AvatarDropdown.render (<eval>:60910:87)\n at <eval>:22956:22\n at measureLifeCyclePerf (<eval>:22237:13)\n at ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext (<eval>:22955:28)\n at ReactCompositeComponentMixin._renderValidatedComponent (<eval>:22982:35)\n at ReactCompositeComponentMixin.performInitialMount (<eval>:22524:31)\n at ReactCompositeComponentMixin.mountComponent (<eval>:22420:22)\n at Object.ReactReconciler.mountComponent (<eval>:13145:36)\n at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (<eval>:21560:45)\n at ReactDOMComponent.Mixin._createContentMarkup (<eval>:17167:33)"]);
</script>