I'm following the Sanity docs on how to add a content preview. After updating the sanity.json and adding a resolveProductionUrl.js file according to docs I should be able to see a menu item in context menu:
But it's not happening. Interestingly enough If I add a console log to a resolveProductionUrl.js I can see it on the browser console - meaning that this function is getting called.
This is what I see:
I ran into a similar issue while following along using Sanity's Preview content on site article.
There were three things I had to do after following their article in order to get it to work:
I had do add this line in sanity.json under plugins
add highlighting to the line:
"plugins": [
...
"#sanity/production-preview"
],
(I didn't add this line to my sanity.json file on the first attempt. The article did not highlight that line, so looks like its just provided as context since the parts entry is highlighted.)
I also had to update resolveProductionUrl.js to use document._id instead of document.slug.current as slug is undefined for me and it was throwing errors in the console (and not showing the menu item).
I had to completely stop the site and re-run sanity start to get it to be picked up locally.
Related
I am making my first steps with QtCreator and I see some issues. I designed a simple widget, see the image below. On this screenshot the bottom view is what I designed and the top view is the result of running the design. I say they are similar, but I expected more. It looks like the running version compresses the components. Is there something I should set in QtCreator?
I also attempted to check the functionality of my widget, using debugging, but I receive the Warning 'This does not seem to be a "Debug" build.' Shall I set something to produce a debug build?
In the meantime I found out that if I do not put the widgets in a layout box,then I receive as output what I expected. Why a layout has such side effect?
Also, in the meantime I added some signal/slot connections. Since I did, I am presented with error message ui_registerwidget.h:13: error: QtWidgets/QAction: No such file or directory. It is a file/code generated by the QtCreator.
I am brand new to odoo, just installed version 9 and made a module 'aidentest' using
.>>python odoo.py scaffold aidentest addons
That created the aidentest module in the addons folder. Uncommented everything in the autogenerated files
but when I went to check out my 'Hello World' page at
http://localhost:8069/aidentest/aidentest
I got a 404 not found
So I went to apps to try and load my module, but I could not find it.
Does anyone know what I need to do on Odoo 9 to load up and start coding my custom module?
Briefly: You have to activate developer mode by going to Top right menu>about>activate developer mode
I had basically given up, and was mindlessly clicking about when I hit the 'About' link on the generic-whiteguy dropdown. I had to actually stop thinking before I was able to locate the completely senseless place where they put the thing I need.
The About modal window popped up, and in it was an activate the developer mode button
Some things changed immediately, but I still couldn't find my custom module.
Then I walked away, came back and when I returned I had some auto-generated emails (new things had loaded - slowly). Did this mean that maybe my module had also become accessible? I checked, and sure enough, there it was.
ZERO DOCUMENTATION about this
Please check the config file.Then send the last error it has.
So I am trying to make modifications to the custom grid app that rally has already created. I found the source code at https://github.com/RallyApps/app-catalog/tree/master/src/apps/grid. However, I cannot get that code to work. I have added it to a js and then ran build (I also changed the json). However, when I then add the app to rally it doesn't give me the settings options (object, query, pagesize, etc) and just generates a table. This table generates 4 rows (the number of user stories I have), but the rows are completely blank except for gears at the beginning of each row. I was wondering if I was building this app incorrectly or if I had grabbed the wrong code. If not, is there a place where can I get the complete code or a way to modify the already existing code?
Thanks
You may add a fetch to the config as below:
config: {
defaultSettings: {
types: 'hierarchicalrequirement',
fetch: 'FormattedID,Name'
}
}
and it will display a grid.
It will not display settings dialog however. The source code in this github repo is not exactly the CustomGrid app available from the AppCatalog in the UI. It does not have the full functionality and not ready yet. I submitted a defect.
Playing around with the newest video.js today, I'm noticing that video.js.map is showing up as a 404 when putting the video.js script into a site that I'm working on.
I don't see a source map file in the initial distribution, but it doesn't throw this error locally, only when I put it on a server.
Ideas as to solving?
You have a few options when you don't have access to a source map:
Ignore the message. It generaly only gets thrown when your dev tools are open.
Remove the reference in the original file. These are the last characters (comments) at the end of the file.
Generate a source map yourself when you have access to the source code. For video.js, it can be generated from video.dev.js.
Use a public CDN version which might not link to the source map.
There also is a discussion on GitHub about this topic.
I get the same error, everything should still work though. I think it's an html5 or browser bug
I was seeing this as well, but only in my log files. I was getting three multi-line entries (failures) every time a video was played in my production.log in a RoR site. It was really bulking up my .log file. More info on #smhg's 2nd bullet (remove references). I'm using video.js 5.4.6 along with some vpad-vast plugin stuff - I could see all three files referenced in my .log file. Your mileage may vary.
Edit video.js and remove the following entry on line 19694:
//# sourceMappingURL=video.js.map
(for vpaid-vast plugin only...)
Edit videojs_5.vast.vpaid.min.js and remove this line from the very end:
//# sourceMappingURL=videojs_5.vast.vpaid.min.js.map
Edit videojs.vast.vpaid.min.css and remove this line from the very end:
/*# sourceMappingURL=videojs.vast.vpaid.min.css.map */
The entries are no longer appearing in my log file and the player works fine.
Hope it helps!
I am trying to use WL.TabBar api and create tabs in the server generated pages but looks like items are not rendered as tabs. But rendered one below the other with dots for each items (like indicated/shown below).
*Item1
*Item2
*Item3
*Item4
Any idea what could be the problem ?. Thanks
Cool, Here are the environment details:
(1) Worklight version 506. Running on Android simulator
(2) Sample code used:
WL.TabBar.setParentDivId("tabpane");
WL.TabBar.init();
WL.TabBar.addItem("item1", function()
{ openNativePage(); },"Item1",{ image: "css/images/Tab.jpg",
imageSelected : "css/images/Tab.jpg"
? });
WL.TabBar.setVisible(true);
(3) I don't see any error messages as such. But I see the below warning in LogCat:
05-16 12:37:42.796: I/Web Console(289): Falling back on PROMPT mode since _cordovaNative is missing. at hostname/wps/contenthandler/!ut/p/digest!SlQs_clcwL2z1b8kIsNvEg/mashup/ra:collection?themeID=ZJ_CGAH47L00OEP00IDBHRNLP0830&locale=en&mime-type=text%2Fplain&entry=wl_client__0.0%3Aconfig_js&entry=wl_init__0.0%3Aconfig_js&entry=wp_theme_high_contrast__0.0%3Aconfig_js&entry=wp_theme_edit__0.0%3Aconfig_js&entry=wp_theme_menus__0.0%3Aconfig_js&entry=wp_theme_skin_region__0.0%3Aconfig_js&entry=wp_one_ui_30__0.0%3Aconfig_js&entry=wp_status_bar__0.0%3Aconfig_js:1044
hmm, I think found the answer. The problem was the CSS files (wlclient.css + wlgap.android.css) were missing at backed the Server (where the custom application exist). I had copied only the native JavaScript files from wlclient and commons folder. Thanks.