Elxis CMS Forum

Support => Administration => Topic started by: rentasite on July 16, 2009, 11:49:45

Title: Problem with contact categories [SOLVED]
Post 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]
Title: Re: Problem with contact categories
Post by: rentasite on July 16, 2009, 16:03:50

i dont understand why is this happening. on another installation, i see it correct.  ::)
Title: Re: Problem with contact categories
Post by: CREATIVE Options on July 16, 2009, 19:39:11
Fix Language & Check the inserts in the DB.
Title: Re: Problem with contact categories
Post by: rentasite on July 16, 2009, 19:51:48


language fixed, seems there is not problem.  what should i check in the DB's inserts ?
Title: Re: Problem with contact categories
Post by: datahell on July 17, 2009, 08:32:10
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&section=com_contact_details
Title: Re: Problem with contact categories
Post by: xmanhattan on July 17, 2009, 10:43:33
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.

Title: Re: Problem with contact categories
Post by: rentasite on July 17, 2009, 10:44:25
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&section=com_contact_details


http://www.xxxxxxxx.gr/administrator/index2.php?option=categories&section=com_contact_details
Title: Re: Problem with contact categories
Post by: rentasite on July 18, 2009, 13:23:03

&    ???

Hmmmm
Title: Re: Problem with contact categories
Post by: datahell on July 19, 2009, 18:04:40
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 &
Title: Re: Problem with contact categories
Post by: rentasite on July 19, 2009, 18:53:21

Solved. Thank you Gianni.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on July 29, 2009, 12:35:09

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.
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on July 30, 2009, 08:38:14
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.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on July 30, 2009, 08:44:01

I have installed Elxis many times and i faced this problem only on "rev2432". I thought i should mention this, if it helps.  :)
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 11, 2009, 10:29:35
Is there any explanation for this problem yet ?

Edit
Quote
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.  :-\
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 16, 2009, 22:23:57
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?


Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 16, 2009, 22:26:39

Thanks Yianni. I will follow the above steps. And i will reply back here.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 17, 2009, 12:39:09
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.

Quote
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

Quote
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]
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 17, 2009, 22:26:00
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&amp;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&amp;task=backup'),


Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 17, 2009, 22:40:31
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 &amp; with just & inside the querries. If this works for you I will update the Elxis installer to use CDATA in these queries.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 17, 2009, 22:41:19

thanks. i will wait and proceed.
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 17, 2009, 23:00:34
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:

Code: (php) [Select]
<?php 
$database
->_resource->debug true;
require_once(
$mainframe->getCfg(&#39;absolute_path&#39;).&#39;/includes/adodb/adodb-xmlschema03.inc.php&#39;);
$schema = new adoSchema($database->_resource);
$schema->ContinueOnError(true);
$schema->SetPrefix($database->_table_prefix);
$schema->ParseSchema($mainframe->getCfg(&#39;absolute_path&#39;).&#39;/testschema.xml&#39;);
$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:

Code: (xml) [Select]
<?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&amp;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&amp;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.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 17, 2009, 23:05:49
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 &amp; 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.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 17, 2009, 23:27:36

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&amp;section=com_contact_details
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 17, 2009, 23:40:02
What's wrong with the above URL? It seems ok.
Title: Re: Problem with contact categories [SOLVED]
Post by: rentasite on November 17, 2009, 23:43:28

Don't u see the &amp; ?

And the result is... i go to Contact Categories, and it returns me to Categories Manager.
Title: Re: Problem with contact categories [SOLVED]
Post by: datahell on November 17, 2009, 23:48:39
I told you to replace &amp; with just & in sql queries. Did you do that? (although &amp; is fine -and better/XHTML valid- for links)
It converted the & to &amp; ?
Maybe it would be better to send me access info to your site to test it by myself.