You are not logged in.
Pages: 1
Hi
Just tried to install xinha and I keep getting the error:
The requested URL was not found on this server.
The link on the <a href="http://localhost/clifton/editArticle.php%3ftype=resources&article=3">referring page</a> seems to be wrong or outdated. Please inform the author of <a href="http://localhost/clifton/editArticle.php%3ftype=resources&article=3">that page</a> about the error.
I had to find it through firebug (view the source of XinhaCore.js), it didnt show on any other plece. The problem to me seems to be that the "?" character (present in the actual address of the page) in the url does not convert back from its "%3f" from. The "&" character seems to be working fine though. Any ideas what might be causing this?
Thanks
Offline
You mean you are putting that HTML into Xinha to be edited and you are getting such an error? Have you tried in other browsers?
Would need to see an example.
Ensure you are using the latest trunk.
James Sleeman
Offline
Hi
Thanks for the answer.
Im not putting any text into xinha. The url taht causes the trouble is the url of the page into which I want to load xinha. The page loads OK, there are no errors, but the text areas are, well, just text areas. If I use firebug (firefox extension) or developer tools in Google Chromium, both tell me that the scripts could not find the address of the page into which I want to load xinha.
Chromium tell me that for method GET the script gets 404
Firefox tells me: see post above
Im using the last stable version. Is that what you mean by last trunk?
here is my config:
xinha_editors = null;
xinha_init = null;
xinha_config = null;
xinha_plugins = null;
// This contains the names of textareas we will make into Xinha editors
xinha_init = xinha_init ? xinha_init : function()
{
/** STEP 1 ***************************************************************
* First, specify the textareas that shall be turned into Xinhas.
* For each one add the respective id to the xinha_editors array.
* I you want add more than on textarea, keep in mind that these
* values are comma seperated BUT there is no comma after the last value.
* If you are going to use this configuration on several pages with different
* textarea ids, you can add them all. The ones that are not found on the
* current page will just be skipped.
************************************************************************/
xinha_editors = xinha_editors ? xinha_editors :
[
'articleIntro', 'articleText'
];
/** STEP 2 ***************************************************************
* Now, what are the plugins you will be using in the editors on this
* page. List all the plugins you will need, even if not all the editors
* will use all the plugins.
*
* The list of plugins below is a good starting point, but if you prefer
* a simpler editor to start with then you can use the following
*
* xinha_plugins = xinha_plugins ? xinha_plugins : [ ];
*
* which will load no extra plugins at all.
************************************************************************/
xinha_plugins = xinha_plugins ? xinha_plugins :
[
'CharacterMap',
'ContextMenu',
'ListType',
'Stylist',
'Linker',
'SuperClean',
'TableOperations'
];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING
if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
/** STEP 3 ***************************************************************
* We create a default configuration to be used by all the editors.
* If you wish to configure some of the editors differently this will be
* done in step 5.
*
* If you want to modify the default config you might do something like this.
*
* xinha_config = new Xinha.Config();
* xinha_config.width = '640px';
* xinha_config.height = '420px';
*
*************************************************************************/
xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
//this is the standard toolbar, feel free to remove buttons as you like
xinha_config.toolbar =
[
["popupeditor"],
["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
["separator","forecolor","hilitecolor","textindicator"],
["separator","subscript","superscript"],
["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
["separator","htmlmode","showhelp","about"]
];
// To adjust the styling inside the editor, we can load an external stylesheet like this
// NOTE : YOU MUST GIVE AN ABSOLUTE URL
xinha_config.pageStyleSheets = [ _editor_url + "examples/full_example.css" ];
/** STEP 4 ***************************************************************
* We first create editors for the textareas.
*
* You can do this in two ways, either
*
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
*
* if you want all the editor objects to use the same set of plugins, OR;
*
* xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config);
* xinha_editors.myTextArea.registerPlugins(['Stylist']);
* xinha_editors.anotherOne.registerPlugins(['CSS','SuperClean']);
*
* if you want to use a different set of plugins for one or more of the
* editors.
************************************************************************/
xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
/** STEP 5 ***************************************************************
* If you want to change the configuration variables of any of the
* editors, this is the place to do that, for example you might want to
* change the width and height of one of the editors, like this...
*
* xinha_editors.myTextArea.config.width = '640px';
* xinha_editors.myTextArea.config.height = '480px';
*
************************************************************************/
/** STEP 6 ***************************************************************
* Finally we "start" the editors, this turns the textareas into
* Xinha editors.
************************************************************************/
Xinha.startEditors(xinha_editors);
}
Xinha._addEvent(window,'load', xinha_init); // this executes the xinha_init function on page load
// and does not interfere with window.onload properties set by other scripts
and my page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="technical/style1.css" />
<script type="text/javascript" src="/Xinha/XinhaCore.js"></script>
<script type="text/javascript">
_editor_url = "http://localhost/clifton/Xinha/" // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
_editor_skin = "silva"; // If you want use a skin, add the name (of the folder) here
</script>
<script type="text/javascript" src="/Xinha/my_config.js"></script>
</head>
<body>
<div id="wholePage">
<a href="index.php"><img src="graphics/header.gif" /></a>
<ul id="mainMenu">
{foreach from=$mainMenu item=value}
<li class="mainMenuItem"><a href="{$value.link}">{$value.text}</a></li>
{/foreach}
</ul>
<div id="content">
<hr class="headingDecor" />
<h1>- {$pageHeading} -</h1>
<hr class="headingDecor" />
{if isset($msg)}
<p>{$msg}</p>
{/if}
<form id="editArticle" action="editArticle.php?type={$articleType}&article={$article->articleID}" method="POST">
<label for="articleName">Article Name:</label>
<input type="text" name="articleName" id="articleName" value="{$article->articleName}" />
<label for="created">Date created:</label>
<input type="text" name="created" id="created" value="{$article->created}" />
<label for="modified">Date modified:</label>
<input type="text" name="modified" id="modified" value="{$article->modified}" />
<label for="published">Published:</label>
<input type="checkbox" name="published" id="published" {if $article->published eq 1}checked="yes"{/if}
<label for="articleIntro">Intro:</label>
<textarea id="articleIntro" name="articleIntro">{$article->articleIntro}</textarea>
<label for="articleText">Text:</label>
<textarea id="articleText" name="articleText">{$article->articleText}</textarea>
<input type="submit" value="Save" id="articleTextSubmit" name="submit"/>
</form>
<div class="clear"></div>
</div>
<div class="articleLink">
Article link 1 (to informative article from resources)
</div>
<div class="articleLink">
Article link 2 (to informative article from resources)
</div>
<div class="articleLink">
Article link 3 (to informative article from resources)
</div>
<div class="articleLink" id="articleLinkLast">
Article link 4 (to informative article from resources)
</div>
<div id="bottomAddress">
Some more contact info.<br>Address and other stuff<br>phone etc.
</div>
<div id="bottomMenu">
<ul id="bottomMenu">
{foreach from=$bottomMenu item=value}
<li class="bottomMenuItem"><a href="{$value.link}">{$value.text}</a></li>
{/foreach}
</ul>
</div>
<div id="clear">
</div>
</div>
</body>
</html>
Thank you very much
Offline
Please donload the latest trunk and try with that,
Go here: http://trac.xinha.org/browser/trunk
Click "Zip Archive" at the bottom of the page.
James Sleeman
Offline
So I figured it out. The problem is not really in the xinha itself, but in the newbee guide. I just copied it and didnt pay it much attention as I assumed it will work. After these changes there was no need to go to the latest trunk.
to include the config.js and the XinhaCore.js files it should read:
<script type="text/javascript" src="Xinha/XinhaCore.js"></script>
<script type="text/javascript" src="Xinha/my_config.js"></script>
instead of:
<script type="text/javascript" src="/Xinha/XinhaCore.js"></script>
<script type="text/javascript" src="/Xinha/my_config.js"></script>
Also fromt he newbee guide its not very clear that the order of the entries of the head has to be as follows.
<script type="text/javascript">
_editor_url = "Xinha/"; // (preferably absolute) URL (including trailing slash) where Xinha is installed
_editor_lang = "en"; // And the language we need to use in the editor.
_editor_skin = "silva"; // If you want use a skin, add the name (of the folder) here
</script>
<script type="text/javascript" src="Xinha/XinhaCore.js"></script>
<script type="text/javascript" src="Xinha/my_config.js"></script>
As far as the order goes someone on this forum had the same problem already. Thanks everybody for heir time and answers. hopfully this will help someone.
Last edited by pecenac (2009-12-13 21:41:01)
Offline
Pages: 1