Elxis CMS Forum
Support => Administration => Topic started by: rentasite on July 16, 2009, 11:49:45
-
Hi, i face this strange problem:
I go through: Components/Contacts/Contact Categories and instead of
Categories Manager (Component: Contact) i see this.......... Categories Manager (Content: All). see attachment
What's going wrong? ::)
thanks
[attachment deleted by admin]
-
i dont understand why is this happening. on another installation, i see it correct. ::)
-
Fix Language & Check the inserts in the DB.
-
language fixed, seems there is not problem. what should i check in the DB's inserts ?
-
After you click Components -> Contacts -> Contact categories Elxis browse you to a URL. Can you please copy-paste the URL here?
The proper URL is: http://www.mysite.com/administrator/index2.php?option=categories§ion=com_contact_details
-
This may have to do with the problem that I was having.
I corrected it by changing the id numbers manually in the database table. I had to click on the link, see what the link was showing, then go to the database, find the corresponding link, and changed the table.
I never did figure out how the problem originated from the beginning.
-
After you click Components -> Contacts -> Contact categories Elxis browse you to a URL. Can you please copy-paste the URL here?
The proper URL is: http://www.mysite.com/administrator/index2.php?option=categories§ion=com_contact_details
http://www.xxxxxxxx.gr/administrator/index2.php?option=categories&section=com_contact_details
-
& ???
Hmmmm
-
If you look at the database the link would be like this: ....&.... you should remove the "amp;" at the end. If this happened in one row there might be other similar problems in other rows too. You should search the db table for such errors and correct them where needed.
Go to phpmyadmin.
Database table: #__components
Column: admin_menu_link
Replace: & with &
-
Solved. Thank you Gianni.
-
Today i found out that another Elxis installation is facing the same problem, as mentioned in my 1st post here. I compared the 2 installations, and found out that both are Elxis 2009.0 Stable rev2432 [ Pandora ] .
While on another 3rd installation (rev2437) i don't face such a problem.
-
This problem occurs during Elxis installation when adodb parses the XML schema file. The problem is that the "&" character is automatically converted into & I don't know why this happens only to a few people. Maybe it is a browser issue or something on the server. I can not regenerate the problem in order to find why this happens for some people. For me it always works fine.
-
I have installed Elxis many times and i faced this problem only on "rev2432". I thought i should mention this, if it helps. :)
-
Is there any explanation for this problem yet ?
Edit
From my provider:
please ask the vendor of the application if the scripts requires any special settings enabled in php, mysql and apache configuration.
During Elxis installation, i don't get any warning. And every recommendation from Elxis, is OK. :-\
-
The problem was with Elxis 2009.0 Pandora rev2431? You said that with a newer version (r2437) you dont face the same problem. So, I don't know if you still face the same problem.
If you do try this:
1. Install Elxis 2009.1. Don't, finish the installation, just do the import data to db step and halt there.
2. Go to phpmyadmin and to the just created table "elx_components". Check the values of the db column named "admin_menu_link". Are the links full or cropped?
If they are OK (full), then everything works fine, continue the installation, DONE.
Continue if the links are not full.
3). Go back to the elxis installer and click the icon to re-start the installation from the beginning.
Open this file: installation/schema/elxis.xml
Go to lines 219 to 243.
Change this: & to this: & in the insert querries.
4). Try to install Elxis again and when you reach the database info page check the checkbox "drop existing tables".
5). Continue and install elxis. Halt exactly after the database step.
6). Check again the inserted links in phpmyadmin. Did the problem solved?
-
Thanks Yianni. I will follow the above steps. And i will reply back here.
-
If you do try this:
1. Install Elxis 2009.1. Don't, finish the installation, just do the import data to db step and halt there.
2. Go to phpmyadmin and to the just created table "elx_components". Check the values of the db column named "admin_menu_link". Are the links full or cropped?
If they are OK (full), then everything works fine, continue the installation, DONE.
The links are cropped. As seen in the attachment. So i continued with the steps bellow.
Continue if the links are not full.
3). Go back to the elxis installer and click the icon to re-start the installation from the beginning.
Open this file: installation/schema/elxis.xml
Go to lines 219 to 243.
Change this: & to this: & in the insert querries.
Done.
& was also found (and changed) in lines 927-933 in elxis.xml
4). Try to install Elxis again and when you reach the database info page check the checkbox "drop existing tables".
5). Continue and install elxis. Halt exactly after the database step.
6). Check again the inserted links in phpmyadmin. Did the problem solved?
After step 4 i get this error message: XML error: EntityRef: expecting ';' at line 221
[attachment deleted by admin]
-
OK, try 3 more possible solutions.
1. URL encode:
replace "&" with %26
Example:
option%3Dcom_banners%26task%3Dlistclients
(In the example above I have also replaced "=" with %3D, but this is not required as "=" is not a problem).
2. Use CDATA
Surround queries with <query><![CDATA[query here]]></query>
Example:
<query><![CDATA[INSERT INTO components VALUES (6, 'Weblink Categories', NULL, 0, 4, 'option=categories&section=com_weblinks', 'Manage weblink categories', NULL, 2, 'js/ThemeOffice/categories.png', 0, NULL)]]></query>
3. Add problematic links to the fixamenuLinks method.
File: installation/includes/elxisinstaller.php
Line: 464
Method: fixamenuLinks
Add proper links replacements to the $fixes array.
Usage:
array('original', 'replacement'),
example:
array('option=com_databasetask=backup', 'option=com_database&task=backup'),
-
I am testing solutions 1 and 2 locally and I will notify you in a few minutes regarding the test results.
TEST RESULTS:
Solution 1( URL encode) did not worked!
Solution 2 (CDATA) worked fine!
Use CDATA and better also replace & with just & inside the querries. If this works for you I will update the Elxis installer to use CDATA in these queries.
-
thanks. i will wait and proceed.
-
For those want to reproduce the test I did, open any elxis component file (f.e. weblinks.php - do the test locally) and at the very top area write:
<?php
$database->_resource->debug = true;
require_once($mainframe->getCfg('absolute_path').'/includes/adodb/adodb-xmlschema03.inc.php');
$schema = new adoSchema($database->_resource);
$schema->ContinueOnError(true);
$schema->SetPrefix($database->_table_prefix);
$schema->ParseSchema($mainframe->getCfg('absolute_path').'/testschema.xml');
$schema->ExecuteSchema();
exit();
?>
Don't use opening and closing PHP tags on the component's file if you include the source inside already opened tags.
The "testschema.xml" file contents:
<?xml version="1.0" encoding="UTF-8"?>
<schema version="0.3">
<sql>
<query>INSERT INTO components VALUES (NULL, 'TEST1', NULL, 0, 1, 'option=com_test&task=list', 'test1', 'com_test', 2, 'js/ThemeOffice/categories.png', 0, NULL)</query>
<query>INSERT INTO components VALUES (NULL, 'TEST2', NULL, 0, 1, 'option=com_test%26task=list', 'test2', 'com_test', 2, 'js/ThemeOffice/categories.png', 0, NULL)</query>
<query><![CDATA[INSERT INTO components VALUES (NULL, 'TEST3', NULL, 0, 1, 'option=com_test&task=list', 'test3', 'com_test', 2, 'js/ThemeOffice/categories.png', 0, NULL)]]></query>
<query><![CDATA[INSERT INTO components VALUES (NULL, 'TEST4', NULL, 0, 1, 'option=com_test&task=list', 'test4', 'com_test', 2, 'js/ThemeOffice/categories.png', 0, NULL)]]></query>
</sql>
</schema>
Visit from your browser the component's page to run the test.
Remove the imported lines in db table elx_components when finish.
-
I am testing solutions 1 and 2 locally and I will notify you in a few minutes regarding the test results.
TEST RESULTS:
Solution 1( URL encode) did not worked!
Solution 2 (CDATA) worked fine!
Use CDATA and better also replace & with just & inside the querries. If this works for you I will update the Elxis installer to use CDATA in these queries.
Ok, im doing it now. Thanks.
-
The installation went further ok. I finished it. but from the admin area, the URL (in Categories Manager) is still as follows:
/administrator/index2.php?option=categories&section=com_contact_details
-
What's wrong with the above URL? It seems ok.
-
Don't u see the & ?
And the result is... i go to Contact Categories, and it returns me to Categories Manager.
-
I told you to replace & with just & in sql queries. Did you do that? (although & is fine -and better/XHTML valid- for links)
It converted the & to & ?
Maybe it would be better to send me access info to your site to test it by myself.