Button used for navigation on Visualforce Page is not working - apex

we have a button on visualforce page which has been called from community portal which is used to navigate from one visualforce page to other visualforce page with the help of the page reference class. The button is not responding.

Use your browser's javascript console (especially Network tab) to check if a request is being sent and what errors (if any) are returned.
Use Setup -> Debug logs, add the user to it, see if there are any errors in the debug log. If the page is exposed without login - you can still debug that, search for the special " Site Guest User" and add that to debug logs.
My gut feel - it's the security. Probably Profile(s) need access to Apex class acting as controller. https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_lc_restrict_apex_guest_users.htm and https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_lc_restrict_apex_authenticated_users.htm

Related

Logout functionality in OutSystems

I am working on web app in OutSystems 10.0. In the application, if I log out, it logs off. But when I click the browser back Button, it redirects to the Previous page (which should be displayed only after login). Any suggestions?
You probably need to have roles on the pages, if the pages have the role anonymous anyone can open it.
You're probably accessing the website via http and not https, so when you press back on the browser it will show you a cached version of the previous page.
Because it's the cached version, the session and roles are not checked.
As a recommendation, force the https protocol.
Following the link provided by #Abdulhakeem, they recommend the following:
Add a hidden input to the page - initialize it to some value (for example 'no') - so when the page is rendered by the server it always has a 'no'
Add a bit of Javascript to the page ready event to:
Check that value - if it's not what you'd expect from the server (in our case, <> 'no'), force refresh the page (see below)
If it is still set to what you'd expect from the server, change it (in our case to 'yes') and do nothing else
I recommend downloading the .oml provided in the post and reviewing how they actually implemented it.
if you can change to https, you can also in every action that is on the page that do changes on the database. check if you have permissions or you are logged. that way if the person tries to do back and do some action you can redirect it somewhere.

Configure a public site in AEM (CQ5)

Current Behavior
I have a Publish Node at "http://pubXX.correlate.net/", when I hit this particular URL it prompts me to log in. Once I log in it takes me to "http://pubXX.correlate.net/projects.html"
As a admin I can see a Site ("Geometrixx Outdoor Site") available to me and I can view the Site at "http://pubXX.correlate.net/content/geometrixx-outdoors/en.html"
Future Behavior Required
I need to configure the Publish Node such that any user who requests for "http://pubXX.correlate.net/" is directly taken to the "Geometrixx Outdoor Site" either after or prior to log in prompt. If it is not possible to configure it this way, please point out the closest possible solution to this.
I am new to AEM and CQ hence I am not aware of the configuration scenarios, excuse me if I have missed out other critical details required to analyse the problem (if so please point that to me and I will provide the same).
Hoping to get a quick response, and I thank all for their help.
Note before: Please make sure your runmode is Publish. You can check:
/system/console/config -> Tab 'Sling Settings'
See more info how to set: http://helpx.adobe.com/experience-manager/kb/RunModeSetUp.html
I see two challenges:
Redirect toplevel domain
The page should be forwarded directly from your top-level domain to a specific page. This can be done by configuring a slingmapping which forwards the page right page on request.
See more info: http://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html
Login
For a login you can configure the Closed User Groups (CUG) mechanism. With configuring this you can force a user to login for a specific part of your site-tree. This configuration can be set on the pageproperties (tab advanced). On this tab you can configure the allowed usergroups and the login page. When the user reaches a site which is part of the CUG (page self or childeren), AEM will forward he user to the login page. After login the user will be redirected back to the referer page.
On the out-of-the-box login component you can configure a success page in case the user lands directly on the loginpage (no referer).
See more info: http://dev.day.com/docs/en/cq/5-6/howto/create_apply_cug.html

Misconfigured App on Facebook but no errors?

I am trying to set up a tab with a link to a contact form from my site on Facebook.
I developed the 'app' through the developers site and have set up the page tab.
I've saved the app and it saves it fine (displaying a message saying changes were saved but it might take some time to propagate across all servers.)
Well I waited an hour and I still can't add the tab to my page. I tried locating the app page directly using the namespace, but I get an error message saying:
"[My App] cannot be displayed because the app is misconfigured."
I don't know how it is misconfigured? There are no errors when saving, so I don't know what the issue is or how to go about fixing it. There are no problems with the app that I can see... how am I supposed to know what's wrong with it?
All it is is a page tab. I've put the link to the page tab in, I don't have a secure page (https) so I have left this box blank but I don't know what to do now.
Any ideas how I can find out in what way it is 'misconfigured'?
This error usually occurs when you try to view the App Center page for the app when the app doesn't have the 'App Details' tab settings populated.
So instead of:
https://www.facebook.com/appcenter/APP_NAMESPACE
Make sure you are loading:
https://apps.facebook.com/APP_NAMESPACE
That page will display hints (if you are admin or developer of the app) on what you are missing.
And, adding to the answer already given by #Donn Lee, which pointed to the right way, you must also ADD A PLATFORM in settings, in https://developers.facebook.com/apps/APP-ID/settings/

Tab Content Does Not Refresh After First Click of Like Button

I've implemented a very simple "like guard" for a facebook tab, and am running into an issue with my test users. Multiple testers are reporting that when they open a tab and click the "like" button, they do not always get a page refresh (so the like guard does not disappear until they do a manual reload). This is using facebook's like button at the top of the page, not one I've coded up myself.
As a sanity check, I enabled some simple logging on my server and have been able to recreate the issue - I hit "like" or "unlike" but there seems to be no request made to my index.php page, so definitely no refresh happening.
I'm aware of this old bug https://developers.facebook.com/bugs/228778937218386 but this one seems different. For starters, after the first click of the "like" button, if I just continue clicking unlike/like/.... then the refresh happens automatically, as expected. What's especially weird is that if I reload the page after the first failed refresh, the refreshes start working again as expected, ie the first update to my like status triggers a page refresh.
Some possibly (?) relevant info:
My Tab is part of a test page, and is unpublished
I am only using http hosting for the tab content, since my https isn't set up yet
So far I've just tested with other admins - so maybe user role affects this?
Curious to see if anyone has run into this issue before.
Finally settled this problem, sharing in case others run into the same issue:
My confusion was caused by where I created/assigned my testers. I made a dummy community page to host the tab I was building and I added all my testers to the test community page. I realized that the only users not getting the weird refresh problems were those testers who I had also added as admin/testers for the app itself. Apparently, adding them as testers to your community page is not enough, and rather than giving you some kind of warning when they view your tabs, testers just get this buggy refresh behavior.

Facebook - Google analytics not capturing inner tab page events/page tracking

The issue is that I'm using Google Analytics to capture user events as the proceed through my application (sits within a tab). The landing page is working fine and data is being sent to GA but when I click on a link on the landing page that takes the user to a new page (still inside the tab) the event/page tracking isn't being captured by Google. I can see the image being requested in Firebug and the parameters are fine but I don't see any instances of it event or the page being tracked in my GA account.
Simplified: APP TAB: DefaultĀ­.aspx (tracking working) --> link to Quiz.aspx which is still in the tab (tracking stops working).
Anyone else experiencing this? Any insight you could be provide would be appreciated.