Not able to unlock the AEM page in AEM6.2 for custom template - aem

I am not able to unlock the page in touch UI editor. Created simple template and page component. There is no code inside the jsp . I am able to lock the page but when trying to unlock page, getting JS in console(please see attached scree shot). It is working fine with geometric template,
Step to produce.
create simple template and component as below
create a page out of this template
open the in touch ui mode.
lock the page
Now try to unlock the below. see the console by pressing f12. below error is displaying.

Try to see first the error.log located in your environment, for instance: AUTHOR_INSTANCE_DIR/crx-quickstart/logs/error.log.
This may provide more information about the issue. You should validate that you are logged in as an admin or at least you are the owner of lock, you can do this by going to the CRXDE Lite, and in the jcr:content node of your page you have to see jcr:lockOwner property with your username.

Related

Bootstrap Vue invalid feedback on input not computed

I am working on a project that previous developer used Bootstrap Vue, the problem I have is with b-form-invalid-feedback.
Invalid feedback works once page is loaded, the reason for that is the docs provides example does the same
, now if you have a page with 10 input for a user to register and directly after he opens the page immediately the invalid feedback starts and shows errors in all fields for the user before he even starts writing his name.
Bootstrap V4.3 CSS uses sibling selectors to show/hide valid/invalid feedback.
Wrap each input+feebdack components inside a div so that the other inputs/feedback are no longer siblings of the previous input(s).

How can I call a cstudio action from a webpage in Crafter

I've created a webpage in Crafter CMS (version 2.5.2) whose purpose is to help edit a Crafter Component. I'm doing this in my page instead of in the CStudio Panel because I want to search/filter for specific components (I have 1000s). I'm editing the components using Crafter's In Context Editing capabilities, but I want to be able to call actions such as Create New, Delete, Approve & Publish, History, etc on a selected component. Is there any way I can do that from my web page along with the UI (e.g. Create New pops up normal Create New modal dialog, History pops up history dialog, etc.).
Crafter CMS uses a message pump between the preview pane and the studio application to inform the application of actions taken "in-context." within the preview pane. Messages (operations with metadata) are pumped by the system automatically between the two contexts (the studio application and the preview pane.)
"Edit" is currently a valid message/op.
"Delete" is currently a valid message/op.
However in 2.5.2 there is no "New" message/op.
In order to fire a New Op message you would need to register the message and build the handler (all Javascript) that fires the appropriate javascript APIs for the app. To fire a New operation you only NEED a path to where the content will be created in the message as metadata. The App already has code to look up permissions and check if which content types are available at that path.
Javascript files of interest:
Fire the message
/static-assets/components/scripts/guest.js
Handle the message
/static-assets/components/scripts/host.js
Declare the valid messages
/static-assets/components/scripts/crafter.js

How to create a new psml page?

I've encountered a .psml page in a portlet app and I don't know how it was created. There exists no physical file for the .psml page. In jetspeed is it possible to create a page via portlet UI, if so how is this achieved ?
Yes you can create a page in JetSpeed through the UI. To do this
Log in using your administrator account.
Click 'edit' (the little pencil icon that shows on each page)
You will see the Page, Folder and Layout configuration on that page.
My understanding is that .psml files are supposed to live inside the pages folder in your Jetspeed home.
Interestingly though, you say your .psml page is inside your app. I am not sure why this would be. If this is the case, perhaps the page was put there by accident?

Spring 3 MVC multi page form with session attributes, cannot go back

I wrote relatively simple web app in Spring MVC. I have following multipage forms:
Fill in
Check preview and eventually go back to 1. by form button or back button in your browser
Confirm
I used annotation #SessionAttributes and everything goes well, besides of going back to edit form after preview.
Then I have an information that document has expired in browser and I have to renew my POST request hence creating new objects. I resolved this problem by creating another method which loads view with form and loads there information from session, but still I can't use 'back button' in my browser. I would like to avoid javascript in this problem. Any ideas?
EDIT: I can see when session is active header is always set to 'no cache no store', maybe there is a way to configure Spring Session to enable cache and store? I searched but didn't find anything helpful.

Facebook app: Random quotes not refreshing on each page load

I have a Facebook app written in php that will display random quotes on your profile.
The box does not appear to update, it looks like it did when it was originally added.
I want to update the profile boxes on each page load (refresh), and not by a user action like clicking a link.
Any idea what is the problem and how to solve it?
This is how I did it for The Office Quotes application:
Put the random quote inside an image (many options to do this in PHP, I used the GD and Image Functions at http://us2.php.net/manual/en/ref.image.php to create a JPG containing the quote).
Accessing this dynamic image in a browser gives you a different random quote each time you refresh.
On the Facebook profile box or tab, simply link this image.
However, Facebook caches the image the first time it's loaded, so it never updates!
To force Facebook to update, you must update Facebook's image cache for the image's URL using the API function fbml.refreshImgSrc which is now accessed via the URL http://api.facebook.com/methods/fbml.refreshImgSrc and requires the access_token parameter like all other API requests. There was an announcement some time ago that this function was being deprecated, but the decision was reversed!
Setup the cache refresh code to run regularly. You can do this on a scheduled task (i.e. a cron job) or on each pageview in the application, or any other way you can think of that will cause the method to be run with the relative frequency the image will be requested by a user.
I also linked the image in the profile to a page in the app that would continually reload a new random image. Users generally would click to this page (which would refresh the image cache on each load) and they get the illusion that the image updates constantly.
Another illusion that I like even better is to add a 'Refresh' link in the profile box/tab that links to a script that refreshes the image cache and immediately returns to the user's profile, so that it actually appears to just be refreshing the profile box/tab.
Enjoy!
Profile content is cached by Facebook and does not connect to your server on every page load. This has always worked like this. No javascript runs on load/automatically, so you can't have a new quote displayed on page load.
What you can do is put a bunch of quotes in the profile content and us the fb:random tag to display a random quote on page load from the random option list. Periodically you can run a script to update the set of quotes in the user profile. If quotes are not unique to each user, you should use fb:ref handles so you just have to update the handle content, not each user's profile. Just put the ref handle in the user's profile.
I'm confused. Profiles boxes are all but gone. You shouldn't be developing anything for a profile box right now - it's just gonna disappear any day now anyway.
And even when profile boxes were still a suggested integration point, you couldn't update them in the way you are wanting to.