I have existing Xpages app for authenticated users only. Now I need to create a two new Xpages and allow annonymous access to them. To do this I added 'Read Public Access documents' do Anonymous user. Now I can see these 2 Xpages anonymously but sudenly existing non-anonymous part of application doesnt work anymore and app raises Dojo errors in browser as below. Scenario is like this:
Tested on Domino 9.01 and 9.0.1FP3 + Chrome with the same results
I open non-anonymous app in browser and authenticate, it works
correctly for now
from different browser I open the anonymous Xpage that works fine
also
now I refresh (F5 in browser) the non-anonymus app from point a) and it starts raise errors as below. I need to restart http to fix it.
I tested this scenario several times on my local and customers server with the same result. I found this http://www-01.ibm.com/support/docview.wss?uid=swg1LO76577 ... but is there any workaround for this scenario? Or how to combine anonymous and authenticated access in one app properly?
XHR finished loading: GET "http://localhost:8090/xsp/.ibmxspres/dojoroot-1.8.3/dojo/require.js"
XHR finished loading: GET "http://localhost:8090/xsp/.ibmxspres/dojoroot-1.8.3/ibm/xsp/widget/layout/layers/nls/xspClientDojo_cs.js".
dojo.js:15 Uncaught TypeError: Cannot read property 'dynamic' of undefined_bc # dojo.js:15_31 # dojo.js:15_f4 # dojo.js:15def # dojo.js:15(anonymous function) # xspClientDojo.js:5
That technote sounds wrong. I've had anonymous and authenticated access in an NSF running fine in production for many years, first deployed on 8.5.1.
My XPage is public access, but the custom control for the layout isn't.
I can't see how point 2 (another user opening on another browser) can impact it.
Based on the word "dynamic" in the error, do you have a dynamic content control in the relevant page? If you're on the same page when you authenticate, I would look at the code running after authentication and whether that changes JS variables or the component tree which means something is then not available to code running on load of the page.
In a system I have to maintain (didn't build it, just inherited it) we have a Foursquare implementation that hasn't been used in quite a while. Trying to revive it failed, because our page is now loaded via HTTPS, which it didn't used to be.
We are using the "Save to Foursquare" button as well as the API request to retrieve the number of Check-ins. I already switched all the JS includes and intent links from http to https and at least now it shows the number and the button correctly.
However, I can't click the button and checking the browser's console I found that it added a script tag to the head of this page which tries to access http://platform.foursquare.com/js/modules/widgets.asyncbundle.js. The browser obviously blocks this, because it's not using HTTPS.
The file we are explicitly loading is https://platform.foursquare.com/js/widgets.js. It seems to me like this script is not reacting correctly to HTTP vs. HTTPS. There is probably a very simple solution to this, so what am I missing?
I don't know if you've tried it yet but the foursquare website says this on the matter:
Change the source of the JavaScript file to https://platform-s.foursquare.com/js/widgets.js
Add {"secure":true} to the global configuration block (window.___fourSq)`
The same link (see below) has all the different ways to call the Save To Foursquare function using its .saveTo() function.
https://developer.foursquare.com/overview/widgets
I hope this information and links helps! Cheers.
I try to call XSP._isDirty() for XPINC but it does not work. In the browser everything works fine. Is there a trick how i can use it.
Is there a way how i can see clientside errors when i'm executing XPages in the Notesclient?
Two questions here.
Q1. XSP._isDirty()
XSP._isDirty() is an internal call. From the XPages portable command guide (page 156).
XSP._isDirty() : Used internally by the Dirty Save feature— see the <xp:view> properties for enableModifiedFlag. This is a private function.
Code for this call is in the file xspClientDojo.js (look for the uncompressed file on Domino/Notes).
As it is an internal call it is used at risk. There is no guarantee it will work as expected in later versions.
The enableModifiedFlag is an XPage attribute that allows you to mark the page as dirty and prevent the user accidentally leaving the page. There are more details about this on the Infocenter.
Q2. Client side debugging.
You can review client side errors using the developer panel of most modern browsers, or something like the firebug plugin. The XPages extension library comes with a Firebug Lite component you can use as well.
For SSJS and XSP engine issues you can review these in the Notes client by reading the XPages logs in the IBM_TECHNICAL_SUPPORT folder contained in the Notes data folder.
For a "live" method of this is to modify the shortcut that launches notes as follows:
Target: C:\Lotus\Notes\notes.exe -RPARAMS -console -debug -separateSysLogFiles -consoleLog
Start In : C:\Lotus\Notes\framework\
Change the path to match your clients install.
I am having an application where there will be lots of ajax calls and jquery load functions etc.I found that dynamic content is not loaded correctly every time i open the page due to browser history,if i delete the history and refresh the page its working fine.now
is there any way to clean up the history of the browser?(is this method correct?)
Can i prevent the page from being cached????using any jquery code.so that my application wont be stored in browsers history.
you need to set cache to false in your jquery ajax settings
see here
I find that when I am doing web development there are a few browser plugins that are very useful to me.
For Firefox I am using:
Firebug - Great for inspecting the HTML elements and working with CSS.
YSlow for Firebug - Developed by Yahoo! and gives timing and tips about page resources.
Live HTTP headers - Lets you inspect the headers that are sent to your browser.
For IE I am using:
Fiddler - "a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet"
I am always looking for other great tools to use. So what is everyone else using?
In addition to what you have:
Web Developer toolbar adds alot of extra functionality (cookie, form, image inspection, viewing generated DOM, etc).
HTML Validator - great for a quick check to make sure your pages are valid. Also good when there are display errors, you can quickly see if it's from improperly generated HTML.
ColorZilla - I use this alot to pull exact colors from a page to the clipboard.
Fireshot -- takes screenshots and annotates them convieniently, helpful.
Extended Statusbar modifies the status bar to show speed, percentage, time, and loaded size (useful for seeing how many images are being loaded, page weight, etc)
ShowIP Displays the IP address of the current page in the status bar
external IP Displays your external IP address in the statusbar
On a side note, I also find it useful to run these extensions in FirefoxPortable, so that I've got a browser setup specifically for development work with the relevant extensions installed, and to avoid slowing down or destabilizing my primary browser (eg. Firebug used to crash my browser all the time when accessing Gmail).
URL Params (Firefox extension) to view the POST and GET parameters of a webpage. Useful for checking your forms.
HttpFox
The one that prevents you from accessing StackOverflow is pretty useful.
All of these are Firefox plugins.
Firebug for Javascript and CSS debugging. Firebug allows for example to examine DOM tree while javascript modifies it. Firebug is my main tool.
Live HTTP Headers for looking at what data actually is inside request and responses.
Web Developer toolbar contains smaller utilities. For example it can validate html and CSS.
Dust Me Selectors finds which pieces of CSS are unused.
IE Developer Toolbar
Venkman debugger for Firefox
Firecookie and console 2
How about twitterfox to help twitter with developer colleagues and friends.
MeasureIt
For getting exact size of items rendered on a page in FF.
Firebug - Also let's me see the JS requests being sent from one page to another and which data is being sent.
- I can see the data inside the JS variables
- Replaces Error Console. It also outputs in the statue if it has found an error, so I can inspect it.
- Good for seeing the structure of the html when developing AJAX application.