In CrafterCMS drag and drop configuration is not working properly - drag-and-drop

In CrafterCMS, I'm trying to setup the drag and drop facility in my current project.
But when I'm in studio I get following error message:
Despite the error, I'm able to add new components to the page with drag and drop, however when I add a new component, all the previous selected components are replaced by the new one.
I.e. if I have:
By adding a new "component6" I get:
Here's the template of page
<#import "/templates/system/common/cstudio-support.ftl" as studio />
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<#assign siteTitle = contentModel.title!"" />
<head>
<meta charset="utf-8">
<title>${siteTitle}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/static-assets/images/favicon.ico">
<!--Google Font link-->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet">
<link rel="stylesheet" href="/static-assets/css/animate.css">
<link rel="stylesheet" href="/static-assets/css/iconfont.css">
<link rel="stylesheet" href="/static-assets/css/font-awesome.min.css">
<link rel="stylesheet" href="/static-assets/css/bootstrap.css">
<link rel="stylesheet" href="/static-assets/css/magnific-popup.css">
<link rel="stylesheet" href="/static-assets/css/bootsnav.css">
<!--For Plugins external css-->
<link rel="stylesheet" href="/static-assets/css/plugins.css" />
<!--Theme custom css-->
<link rel="stylesheet" href="/static-assets/css/style.css">
<!--<link rel="stylesheet" href="/static-assets/css/colors/maron.css">-->
<!--Theme Responsive css-->
<link rel="stylesheet" href="/static-assets/css/responsive.css" />
<!-- Scroll Indicator Bullets-->
<link rel="stylesheet" href="static-assets/css/jquery.scrollindicatorbullets.css" />
<script src="/static-assets/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
</head>
<body data-spy="scroll" data-target="#navbar-menu" data-offset="110">
<!-- Header -->
<#include "/templates/web/page-home-header.ftl" />
<!-- Sections -->
<div <#studio.iceAttr iceGroup="sections"/> >
<div class="sections" <#studio.componentContainerAttr target="sections" objectId=model.objectId/>>
<#list (contentModel.sections.item)![] as aSection >
<#renderComponent component=aSection />
</#list>
</div>
</div>
<!-- Footer -->
<#include "/templates/web/page-home-footer.ftl" />
<!-- JS includes -->
<script src="/static-assets/js/vendor/jquery-1.11.2.min.js"></script>
<script src="/static-assets/js/vendor/bootstrap.min.js"></script>
<script src="/static-assets/js/jquery.magnific-popup.js"></script>
<script src="/static-assets/js/jquery.easing.1.3.js"></script>
<script src="/static-assets/js/bootsnav.js"></script>
<script src="/static-assets/js/plugins.js"></script>
<script src="/static-assets/js/main.js"></script>
<#studio.toolSupport/>
</body>
</html>
This is the template of the component I'm using:
<#import "/templates/system/common/cstudio-support.ftl" as studio/>
<!--Dialogue section-->
<section id="dialogue" class="dialogue bg-white roomy-80" <#studio.componentAttr path=contentModel.storeUrl />>
<#if contentModel.sectionTitle?? ><span class="scrollIndicatorTitle">${contentModel.sectionTitle}</span></#if>
<div class="container">
<div class="row">
<div class="main_dialogue text-center">
<div class="col-md-12">
<h3>${contentModel.text}</h3>
</div>
</div>
</div>
</div>
</section>
When I add the component in the log I see:
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Delete for id:"spbb:/site/components/component6.xml" OR parentId:"spbb:/site/components/component6.xml" successful: {responseHeader={status=0,QTime=3}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Update for spbb:/site/components/component6.xml successful: {responseHeader={status=0,QTime=3}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Commit successful: {responseHeader={status=0,QTime=24}}
[INFO] 2017-05-09 12:25:44,716 [http-nio-8080-exec-9] [spbb] [rest.SiteCacheRestController] | Content cache and Freemarker cache have been cleared for site 'spbb'
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Delete for id:"spbb:/site/website/products/index.xml" OR parentId:"spbb:/site/website/products/index.xml" successful: {responseHeader={status=0,QTime=7}}
WARN : org.craftercms.search.service.impl.RenameFieldsIfMultiValuePostProcessor - Field 'sections.item.component.createdDate_dt' is declared as single value, but multiple values where provided in spbb:/site/website/products/index.xml. Renaming to multi value field 'sections.item.component.createdDate_dts'
WARN : org.craftercms.search.service.impl.RenameFieldsIfMultiValuePostProcessor - Field 'sections.item.component.lastModifiedDate_dt' is declared as single value, but multiple values where provided in spbb:/site/website/products/index.xml. Renaming to multi value field 'sections.item.component.lastModifiedDate_dts'
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Update for spbb:/site/website/products/index.xml successful: {responseHeader={status=0,QTime=7}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Commit successful: {responseHeader={status=0,QTime=29}}
[INFO] 2017-05-09 12:25:45,174 [http-nio-8080-exec-10] [spbb] [rest.SiteCacheRestController] | Content cache and Freemarker cache have been cleared for site 'spbb'
There's something else that I'm missing?

Related

Chalkboard pre-recorded drawing in reveal presentation not loading

I have been using the chalkboard plugin for a reveal presentation. As it is written on the github page (https://github.com/rajgoel/reveal.js-plugins/tree/master/chalkboard), I saved the drawings in a json file by pressing d (as far as I can tell, the data was correctly stored in the json file) and then I added the line src: "prova/cb.json", to the initialization for chalkboard and loaded the presentation with ?print-pdf.
However, when I open the presentation, there is no trace of the drawings that should be loaded.
This is the html of a minimal (non) working example...
Does anyone know what's going on?
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Prova</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/night.css" id="theme">
<link rel="stylesheet" href="plugin/highlight/monokai.css" id="highlight-theme">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section >
<h4>Prova</h4>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/zoom/zoom.js"></script>
<script src="plugin/math/math.js"></script>
<script src="plugin/chalkboard/plugin.js"></script>
<script>
Reveal.initialize({
hash: true,
controls: false,
transition: 'convex',
math: {
mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS-MML_HTMLorMML'
},
chalkboard: {
src: "prova/cb.json",
toggleChalkboardButton: { left: "80px" },
toggleNotesButton: { left: "130px" },
},
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealZoom, RevealMath, RevealChalkboard ],
});
</script>
</body>
</html>

Polymer 3 - Unity3D WebGl

Has anyone ever succeed integrating Unity WebGl and Polymer 3?
I'm trying to make the webgl code a polymer 3 element, but I am still not able to do it. I could not find any tutorial or information about it.
In html I have to do the following:
head
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | Test</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/WEBdev.json", {
onProgress: UnityProgress,
Module : {
cacheControl: {"default": "immutable"},
}
});
head
body
<div class="webgl-content">
<div id="gameContainer" style="width: 1066px; height: 600px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
<div class="title">SOMA3D</div>
</div>
</div>
body
Any tips?

Chart not displaying (Ionic Project)

tab-dashboard.html
<ion-content class="padding" ng-controller="DashboardCtrl">
<div class="card">
<div class="item item-divider">
A line chart
</div>
<div class="item item-text-wrap">
<canvas id="line" class="chart chart-line" data="data" labels="labels" legend="true" series="series" options="{showTooltips: false}"></canvas>
</div>
</div>
<div class="card">
<div class="item item-divider">
A bar chart
</div>
<div class="item item-text-wrap">
<canvas id="bar" class="chart chart-bar" data="data" labels="labels" legend="true" series="series" options="{showTooltips: false}"></canvas>
</div>
</div>
</ion-content>
</ion-view>
app.js
angular.module('starter', ['ionic', 'chart.js', 'starter.controllers', 'starter.services', 'ngCordova'])
.state('tab.dashboard', {
url: '/dashboard',
views: {
'tab-dashboard': {
templateUrl: 'templates/tab-dashboard.html',
controller: 'DashboardCtrl'
}
}
})
controller.js
.controller('DashboardCtrl', function($scope){
$scope.labels = ["January", "February", "March", "April", "May", "June", "July"];
$scope.series = ['Series A', 'Series B'];
$scope.data = [
[65, 59, 80, 81, 56, 55, 40],
[28, 48, 40, 19, 86, 27, 90]
];
})
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="manifest" href="manifest.json">
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<!--CHART CSS-->
<link rel="stylesheet" href="lib/ionic/css/angular-chart.css">
<!--/CHART CSS-->
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
</head>
<body ng-app="starter">
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<!--
The views will be rendered in the <ion-nav-view> directive below
Templates are in the /templates folder (but you could also
have templates inline in this html file if you'd like).
-->
<!--Chart -->
<script src="lib/ionic/js/Chart.min.js"></script>
<script src="lib/ionic/js/angular-chart.min.js"></script>
<!--barcode-->
<script src="js/ng-cordova.min.js"></script>
<ion-nav-view></ion-nav-view>
I have just paste a part of my code that is relevant to this dashboard only. However, after debugging and realizing there is no error in the code itself, i still couldn't manage to display my chart. Is it true that i am missing some JS file or is it that i am missing a few lines of code. Thanks
Where you define your chart canvas, you need to use the correct directives, which are prefixed with chart-:
<canvas id="bar" class="chart chart-bar"
chart-data="data"
chart-labels="labels"
legend="true"
chart-series="series"
chart-options="{showTooltips: false}"></canvas>
See the documentation

Polymer 1.0 paper-drawer-panel toggle is not working

'my-layout' code :
<link rel="import" href="../bower_components/iron-icons/iron-icons.html" >
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html" >
<link rel="import" href="../bower_components/paper-drawer-panel/paper-drawer-panel.html" >
<link rel="import" href="../bower_components/paper-header-panel/paper-header-panel.html" >
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html" >
<polymer-element name="m-layout" >
<template>
<paper-drawer-panel>
<paper-header-panel drawer>
<paper-toolbar>
<div>Application</div>
</paper-toolbar>
<div> Drawer content... </div>
</paper-header-panel>
<paper-header-panel main>
<paper-toolbar>
<paper-icon-button icon="menu" style="color: white;" paper-drawer-toggle></paper-icon-button>
<div>Title</div>
</paper-toolbar>
<div> Main content... </div>
</paper-header-panel>
</paper-drawer-panel>
</template>
<script>
Polymer({
is: 'm-layout',
togglePanel: function() {
this.$.paper_drawer_panel.togglePanel();
}
});
</script>
</polymer-element>
If I add paper-drawer=toogle attribute, paper-icon-button in main drawer is disappear...
'main.jsp' code:
<%# page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<html>
<head>
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="elements/m-layout.html" >
<style>
html, body {
height: 100%;
}
body {
margin: 0;
background-color:#E5E5E5;
}
</style>
</head>
<body>
<m-layout></m-layout>
</body>
</html>
If paper-drawer-toggle attribute remove and main.jsp run, I can see icon-button but toggle is not working..
I can't found reference about paper-drawer-panel toggle and behavior.....
What should I do to toggle paper-drawer-panel?
There are a few things I noticed in your code.
In your my-layout code you should also be importing polymer.html
Which version of Polymer are you using? Since you are using the webcomponents-lite.min.js and the title states Polymer 1.0, I am assuming you are using 1.0. In Polymer 1.0 elements are defined using <dom-module id="m-layout"> instead of <polymer-element name="m-layout">
the toggle function in your script is not necessary, the toggle works out of the box using the paper-drawer-toggle attribute on the paper-icon-button element.
I am not sure of your directory structure but the following code works for me. I am assuming you have bower_components (including all polymer, iron, and paper elements) inside of your root. Also in your root I am assuming you have an elements directory containing your m-layout.html file.
You should check your developer tools in your browser to check that all your resources are loading correctly and there are no errors. If so, then your import paths to the components are wrong.
In your elements/m-layout.html:
<link rel="import" href="../bower_components/iron-icons/iron-icons.html" >
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html" >
<link rel="import" href="../bower_components/paper-drawer-panel/paper-drawer-panel.html" >
<link rel="import" href="../bower_components/paper-header-panel/paper-header-panel.html" >
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html" >
<link rel="import" href="../bower_components/polymer/polymer.html">
<dom-module id="m-layout" >
<template>
<paper-drawer-panel>
<paper-header-panel drawer>
<paper-toolbar>
<div>Application</div>
</paper-toolbar>
<div> Drawer content... </div>
</paper-header-panel>
<paper-header-panel main>
<paper-toolbar>
<paper-icon-button icon="menu" style="color: white;" paper-drawer-toggle></paper-icon-button>
<div>Title</div>
</paper-toolbar>
<div> Main content... </div>
</paper-header-panel>
</paper-drawer-panel>
</template>
</dom-module>
<script>
Polymer({
is: 'm-layout'
// this is not needed
//togglePanel: function() {
// this.$.paper_drawer_panel.togglePanel();
//}
});
</script>
and this in main.jsp:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>My Test</title>
<!-- Load platform support before any code that touches the DOM. -->
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="elements/m-layout.html">
</head>
<body>
<m-layout></m-layout>
</body>
</html>
Also keep in mind, that the drawer (and therefore the toggle) is only activated when the screen is very small (mobile). To force the drawer behavior no matter what the screen size, you can force the narrow view by setting the force-narrow attribute: <paper-drawer-panel force-narrow="true">. Alternatively you can set the width at which the drawer should be activated, <paper-drawer-panel responsive-width="800px">.
http://jsbin.com/winedi/edit?html,output
<style>
</style>
<template>
<paper-drawer-panel id="drawer">
<div drawer>
drawer
</div>
<paper-header-panel main>
<paper-toolbar class="teal-500">
<paper-icon-button icon="menu" on-tap="menuToggle"></paper-icon-button>
<div class="title">{{toolBarTitle}}</div>
<paper-icon-button icon="search"></paper-icon-button>
</paper-toolbar>
</paper-header-panel>
</paper-drawer-panel>
</template>
<script>
Polymer({
is: "layout-inbox",
menuToggle: function() {
if (this.$.drawer.narrow && this.$.drawer.getBoundingClientRect().width < parseInt(this.$.drawer.responsiveWidth)) {
this.$.drawer.togglePanel();
} else {
this.$.drawer.forceNarrow = !this.$.drawer.forceNarrow;
}
},
properties: {
toolBarTitle: {
type: String,
value: "lucok"
}
}
});
</script>
</dom-module>
I think your code is working. The paper-drawer-toggle attribute is used to tell the browser to show the menu icon when the screen with is narrow. When you size the screen to a small enough width, you should seen the menu icon appear.
Maybe did you just miss the correct DocType in the head of main.jsp
<!DOCTYPE html>

Facebook Can't scrape my Joomla website even when i added OG:tags

I have all the OG tags specified but Facebook still can't read my website. What's wrong?
Here is my HEAD section
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="http://www.mojadebica.pl/kryminalne/1392-akcja-trzezwy-poranek-na-podkarpaciu" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Dębica, pizzerie, pizza, wyszukiwarka, jedzenie, na, wynos, dyżury, aptek, noclegi, reklama, strony www, portal, informacje, ogłoszenia, repertuar kin, oferty, pracy, forum, org, nasza" />
<meta name="og:image" content="http://www.mojadebica.pl/images/thumbs/poranek.jpg" />
<meta name="og:type" content="article" />
<meta name="title" content="Akcja 'Trzeźwy poranek' na Podkarpaciu" />
<meta name="og:title" content="Portal MojaDebica.pl" />
<meta name="og:url" content="http://www.mojadebica.pl/kryminalne/1392-akcja-trzezwy-poranek-na-podkarpaciu" />
<meta name="og:site_name" content="E-max" />
<meta name="og:description" content="Moja Dębica - najnowsze informacje i aktualności z Dębicy. Największa baza ofert pracy, ogłoszenia z dębicy i okolic oraz wyszukiwarka pizzy!" />
<meta name="description" content="Moja Dębica - najnowsze informacje i aktualności z Dębicy. Największa baza ofert pracy, ogłoszenia z dębicy i okolic oraz wyszukiwarka pizzy!" />
<meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
<title>Akcja "Trzeźwy poranek" na Podkarpaciu</title>
<link href="/templates/back-to-nature/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="/media/system/css/modal.css" type="text/css" />
<link rel="stylesheet" href="/components/com_k2/css/k2.css" type="text/css" />
<link rel="stylesheet" href="/components/com_jcomments/tpl/default/style.css?v=12" type="text/css" />
<script type="text/javascript" src="/media/system/js/mootools.js"></script>
<script type="text/javascript" src="/media/system/js/modal.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="/components/com_k2/js/k2.js"></script>
<script type="text/javascript" src="/components/com_jcomments/js/jcomments-v2.1.js?v=7"></script>
<script type="text/javascript" src="/components/com_jcomments/libraries/joomlatune/ajax.js?v=3"></script>
<script type="text/javascript" src="/media/system/js/caption.js"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
$$('a.modal').each(function(el) {
el.addEvent('click', function(e) {
new Event(e).stop();
SqueezeBox.fromElement(el);
});
});
});
var K2SitePath = '/';
</script>
<link rel="stylesheet" href="/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="/templates/mdnew/stylemd4.4.css" type="text/css" />
<link rel="shortcut icon" href="/templates/mdnew/favicon.ico" />
<!--[if lte IE 6]>
<link href="/templates/back-to-nature/css/ieonly.css" rel="stylesheet" type="text/css" />
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-15391002-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
And here is sample article:
http://www.mojadebica.pl/video/1388-sonda-gdzie-jest-najlepsze-jedzenie-w-debicy-video-hd
Missing Required Property: The 'og:url' property is required, but not present.
but it's specified here:
<meta name="og:url" content="http://www.mojadebica.pl/kryminalne/1392-akcja-trzezwy-poranek-na-podkarpaciu" />
Your problem is with your webserver configuration.
In your response headers, your server is sending Content-Encoding: none. This is not valid.
There may be additional rules in there that are sending the Facebook parser a 403: Forbidden reply.
If you host with an ISP, contact them about this problem. If you're rolling your own server, you'll need to dig into the LiteSpeed documentation.