Aloha Editor not reading data from db file - aloha-editor

I managed to get [Aloha editor][1] working with SQLite database file without problem on one website so I thougnt I will copy all the files to get the other website work too but I found the problems which I cannot resolve myself. Problems might be leated to each other, not sure.
Problem 1:
I see editing textarea with "Click to edit me." Whatever I type there goes to db.sqlite file as I can see data by sqlitebrowser.exe. But if I refresh page I still see "Click to edit me."
Problem 2:
When I edit Page and press F5 (refresh) page shows as usual but cannot edit it anymore (no yellow highlights)
But when I press Ctl+F5 that I can edit the page (of course as per problem 1 still is just "Click to edit me.")
Thats how I load JS (same order):
<script type="text/javascript" src="alohaeditor/aloha/lib/require.js"></script>
<script type="text/javascript" src="aloha-config.js"></script>
<?php if ($login->isLoggedIn() && !empty($_SESSION['settings_users_name'])){?>
<script type="text/javascript" src="alohaeditor/aloha/lib/aloha.js" data-aloha-plugins="common/ui,common/format,common/highlighteditables,common/link,common/characterpicker,common/undo"></script>
<script type="text/javascript" src="aloha-save.js"></script>
<script type="text/javascript">
Aloha.ready( function() {
Aloha.jQuery('.editable').aloha();
});
</script>
<?}?>
It's already 5h like I'm trying to work out how to solve that.
Can someone please point me out how to check whats wrong? (maybe how to use firebug in this case to trace problem?)
[1]: http://aloha-editor.org/

Related

Submit Order on Drupal 7 Custom Theme Redirects Back to Checkout Page

When I submit an order on my custom theme using ubercart on Drupal 7, I get redirected to the cart/checkout page again. The order shows up as being abandoned. The redirected is the checkout page again and has everything from the previous order but the full credit card information(last 4 digits and cvv). I am not getting an error messages that I am aware of after checking log files.
I tried adding the mytheme_uc_checkout_pane_cart_review function to my theme's template.php file as described on the documentation here to see if that helped, but that didn't seem to work. How could I fix this issue so the order goes through and gets to the completed order page.
In addition, I found another person having the same issue, but mind is not caused by a non-valid product. Link to that issue Here
Based on some looking The checkout works fine on the default theme Bartik 7.50. Thank you for any help!
I just have a similar problem with a very simple solution. Look in Reports > Recent log messages, if your page can find the js files: jquery-ui, jquery-x.x.x.min.js.
if not, you need to fix it.
In my case, I forget to put this in my [customtheme]/templates/html.tpl.php, that I have modified previously:
<script type="text/javascript" src="<?php print base_path() . path_to_theme() .'/' ?>js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<?php print base_path() . path_to_theme() .'/' ?>js/jquery-ui.min.js"></script>

What are the characters appearing at the end of my appengine URL

I have an appengine Python application. It includes the simpleauth library. I am viewing the application in Google Chrome.
After I load a page in the application, some text that looks like (for example) "#.UhJcZ2TwKa4" is appended to the end of the URL.
What is this and where does it come from?
Upon edit, maybe it's one of my javascript includes that is doing it. Here are all my javascript includes:
<script type="text/javascript" src="/static/js/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="//use.typekit.net/dvk0ttp.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script type="text/javascript" src="//api.filepicker.io/v1/filepicker.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
Thanks in advance,
Aaron
Looks like you're using AddThis APIs and you have enabled address bar tracking which appends those "strange" characters to the page url.
Those parameters are used to collect data if someone copies the URL somewhere else
If you don't want this feature, you can disable it, editing the javascript config variable for the APIs (See attached link for the tutorial)
data_track_addressbar = false;
Source: AddThis Support
Inserting:
<script type="text/javascript">
var addthis_config = addthis_config||{};
addthis_config.data_track_addressbar = false;
addthis_config.data_track_clickback = false;
</script>
before closing the tag cleans the URL
This is the corect resource: Removing all hashtags/anchors from your URLs

SCRIPT5022: Argument 'module' is not a function, got undefined angular.js, line 975 character 5

I am facing below exception in IE-8 when I am loading the angular related page. It works fine in other browsers. Any specific reason?
SCRIPT5022: Argument 'module' is not a function, got undefined
angular.js, line 975 character 5
I had this same issue (when on IE < 9) and it took me forever to track it down...
angular.module('app', ['app.directives', 'app.filters', 'app.services', ]);
Note the trailing comma after 'app.services'.
I get errors like that when I try to inline end the script tag causing IE to not load all my scripts. Check if you have end tags for all your script includes.
To illustrate:
<script src="js/services.js"></script>
<script src="js/controllers.js"/> <!-- THIS IS A PROBLEM FOR IE -->
<script src="js/filters.js"></script>
<script src="js/directives.js"></script>
<script src="js/myApp.js"></script>
On IE9 this will result in:
SCRIPT5022: No module: myApp.filters
angular.min.js, line 17 character 195
Not entirely the same, but I can't test it on IE8. On Chrome however, this works perfectly. The weird thing about this, is actually the thing it can't seem to find, is in the script following the one with the inline ending. I can't really explain that.
Now, when I close the script tag like this:
<script src="js/services.js"></script>
<script src="js/controllers.js"></script> <!-- THIS WORKS -->
<script src="js/filters.js"></script>
<script src="js/directives.js"></script>
<script src="js/myApp.js"></script>
It works like a charm.
To sum it up, AngularJS tries to find your module called 'module', but is not able to find it. Probably due to a script that is not loaded. Try to find a script tag which closes inline, and end it as descibed above.
Hope that helps.
Another thing that might cause this is using keywords for object properties. I had three modules with the error above:
statistic.import = !statistic.import;
default: $scope.newGrid.default
$scope.data = JSON.stringify({export: exportParams})
The offending properties being import, default and export.
I don't know if you're still walking around same problem, but i've found up a possible cause:
when you declare any angular module you must inject dependences some like this:
angular.module('MyStore', ['ng','ngRoute']);
if you need invoke that module from another place to perform any action you probably mismatch if you attempt to inject dependences again... then you must call it by its name like this:
angular.module('myStore')
otherwise you will exploit your brain looking for the solution.
I hope it helps!

How to use a file from Ext.example

I went through the docs to find for a Ext.example.msg but, i am unable to find it.
According to this example, they have successfully used Ext.example.msg. How is this ?
I had another question on SO which is related to this.
UPDATE
I am trying to use the following code in my application;
Ext.example.msg('Button Click', 'You clicked ta button');
When i execute the code, i get an error saying TypeError: Ext.example is undefined .
To overcome this error i did the following;
1.) added <script type="text/javascript" src="app/extjs/examples/shared/examples.js"/> in my app.html file
2.) added the following in my app.js file
Ext.Loader.setPath('Ext.example', 'app/extjs/examples/shared');
Ext.require(['Ext.container.Viewport',
'Ext.example.*']
);
None of the above methods works, i still get the same error message.
My project folder structure is as follows;
Project_Name
->app (folder)
--> app.html
--> app.js
--> extjs
---> examples
---->shared
----->example.js
When you include your js script in you index.html, as you did in 1:
<script type="text/javascript" src="app/extjs/examples/shared/examples.js"/>
You no longer need loader or to require it - you have explicitly included it and it is clear the script content will be in scope.
It appear to me your path is incorrect: There's no app/extjs and it would make sense to have the extjs folder as sibling to that of your app. Thus this should work:
<script type="text/javascript" src="extjs/examples/shared/examples.js"/>

google +1 button not showing up

I've added the required tags, but it is still not showing. I've added this in head:
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{lang: 'lt', parsetags:'explicit'}
</script>
and this in the body:
<g:plusone href="http://www.fanuspinta.lt/katalogas/lietuva-mar%C5%A1kin%C4%97liai-31"></g:plusone>
At first I thought it didn't show up because I was using a local server, but now it's in production, and still not showing.
URL in case: http://www.fanuspinta.lt/katalogas/lietuva-mar%C5%A1kin%C4%97liai-31
Thanks for any ideas.
I used a html5 tag like shown here without the data-href attribute, dynamically added it afterwards (when the lightbox was loaded) and explicitely loaded the div containing the plusone code at the end.

Resources