Elxis CMS Forum

Support => Administration => Topic started by: StefanSultanov on February 10, 2012, 14:24:19

Title: Can't select new content item category. [SOLVED]
Post by: StefanSultanov on February 10, 2012, 14:24:19
I run 2009.3 site www.woodensouvenirs.net
Recently I populated the site categories through .csv file import in PHP MyAdmin backend.
Since then, when I try to create New Content Item, I select the section in the dropdown, but the categories dropdown doesn't update and I can't select category.

for now I know that I might have some invalid SEO titles.
But I noticed something else:
When I enter for the category name - example: "Bishop's Waltham" and hit save, the new category name goes "Bishop\'s Waltham"

Do you have an idea what could be wrong?
Is there something I can do to fix this?

Thank you!
Title: Re: Can't select new content item category.
Post by: webgift on February 10, 2012, 16:57:53
It's important to avoid non valid characters when we are submitting a new category, content item or autonomous page. It's highly recommended avoid using characters like ",'/ etc.
Title: Re: Can't select new content item category.
Post by: xmanhattan on February 11, 2012, 10:32:44
Hello StefanSultanov,

What webgift mentions is the general rule for Php / MySql so what assuming that you can reload, remove the single quotes from your csv.

Then after they are loaded you can simply go in and edit the categories that need to have a quote so that they are placed in the database correctly.

Title: Re: Can't select new content item category.
Post by: StefanSultanov on February 12, 2012, 11:27:17
I double checked the file encoding.
I have checked for spaces and special characters with notepad++.
I completely truncated the table and reloaded it.

I noticed, that most of my records in the "checked out time" field says: "1979-12-19 00:00:00"
I replaced this with yesterday, but no effect.
Could this be the problem?

I repeat: The problem is, that I can't select the category in the "New Content item" page.
I can move a content item to any category and this how I work around this issue for now. 

If I accidentally loaded ANSI CSV, and worked on that for dome time, Did I do damage to the site?
If I did which files to replace?

Please help? What to do?
Title: Re: Can't select new content item category.
Post by: xmanhattan on February 12, 2012, 13:06:37
I would not use the ansi setting because it might affect the data especially if you are using multiple languages.
Another way to look at the data is to use phpmyadmin and see what is happening directly in the table.
I do not believe that the time stamp field is the problem.

Check that you have not placed a single quote in the sections or category titles areas because that may affect the select box.

Title: Re: Can't select new content item category.
Post by: StefanSultanov on February 12, 2012, 15:01:46
It can affect? Can you be more specific?
I mean, when I posted this and you advised me I went back and saw, that there were single quotes in the fields.
I replaced single quotes and spaces with "-" character. (Notepad++)

I reloaded the file in the database and everything went well.
It popped out some errors which I investigated and corrected.

Now the table is loaded with the new and clean UTF-8 data.
But still there is no effect.

You said that single quotes can affect the field, and I know there was.
So I know the field was affected, but can I fix that somehow?
Is this damage irreparable?
I attach the file for you to check.
Title: Re: Can't select new content item category.
Post by: xmanhattan on February 12, 2012, 18:36:57
After looking at your csv file, I compared one line of elxis original data to yours as follows:
Code: [Select]

"13";"0";"Aberdeen";"Aberdeen";NULL;"5";"left";"webpage content from original elxis data";"1";"0";"2012-02-10 07:30:24";NULL;"1";"29";"0";NULL;"english";"elxis-category-content-area"

"12";"0";"Another Elxis Category to distinguish content area";"webpage content     yours";"1";"0";"1979-12-19 00:00:00";NULL;"1";"29";"0";NULL;"english";"elxis-category-content-area"


I loaded it into my test base and the category drop down would not work but that is normal as I do not have the sections as you would.

Therefore, the question now is whether you have assigned the section data to the categories correctly.

It is better to work with sql files rather than csv.

Also, can you post the errors that you are seeing.

The damage can be fixed assuming that the data relations are correct.  If you believe that they are correct, then try:
Tools
clean cache
empty temporary
and fix language.

I notice that the data is showing null in the language field that means that you are using the all languages as default.

Title: Re: Can't select new content item category.
Post by: StefanSultanov on February 13, 2012, 09:13:33
I thank you very much for your efforts!!!!

However still I don't have a clue. It doesn't display any errors.

Quote
1   elx_categories   0     OK
2   elx_content   0     OK
3   elx_eblog   0     OK
4   elx_menu   0     OK
5   elx_modules   0     OK
6   elx_polls   0     OK
7   elx_sections   0     OK
8   elx_submitted_content   0     OK
9   elx_weblinks   0     OK
This came out when fixing language. All is ok, except that the problem does not go away.

My sections manager is showing the following:
Quote
1 Wooden Souvenirs id=8 #cat=1 Active=1 trash=0    
2 Northern Ireland id=7 #cat=476 Active=0 trash=0
3 Wales            id=6    #cat=167   Active=0     trash=0
4 Scotland         id=5   #cat=226   Active=0     trash=0
5 England          id=4   #cat=986   Active=150  trash=7
6 Newsflashes1    id=1   #cat=1       Active=0     trash=6

I double checked the csv and the table in PHP MyAdmin.
The table seems ok, but it was OK before I noticed the error and posted this topic, so it's not much of a help.
I double checked for miss-assigned sections and categories.
Please note, that I didn't touch anything else than the "elx_categories" table.
All of my sections were created in Elxis backend.

I can only create new content item if I copy a content item, which was previously created.
The "copy content item" and "move content item" pages read the categories OK.
Will it help if you register on woodensouvenirs.net?
I can give you access and you can look around.

Please don't give up on me!
Thank you!
Title: Re: Can't select new content item category.
Post by: xmanhattan on February 13, 2012, 11:48:24
Okay, do a complete sql backup and send that to me via a pm.
Title: Re: Can't select new content item category.
Post by: xmanhattan on February 16, 2012, 16:43:40
StefanSultanov,

I have just been looking at your categories sql and found that you have 8 sections with 1868 categories.

I will have to ask that webgift and maybe datahell confirmation that this is possible but from what I tried on my local system, the categories drop down under a new content item for category 5 alone was a waiting time.  I do not know exactly what you intend to do by including what looks like a category for every city name there is but I think that you may have to organize it in a different way.

This is a view from the category listing (test 4 to 8 are the section names that I associated the categories with):
Quote
4   test 4   Published   Move Up    Move Down    Public Frontend    4   986   1   0   All
5   test 5    Published   Move Up    Move Down    Public Frontend    5   226   0   0   All
6   test 6    Published   Move Up    Move Down    Public Frontend    6   167   0   0   All
7   test 7    Published   Move Up    Move Down    Public Frontend    7   476   0   0   All
8   test 8    Published   Move Up    Move Down    Public Frontend    8   1   0   0   All

Category #4 has 986 records but even trying to get the category 8 drop down was delayed on my system.

webgift or datahell, your opinion is needed.

Title: Re: Can't select new content item category.
Post by: StefanSultanov on February 21, 2012, 15:50:32
Thank you very much for your efforts!
I will wait for the opinion of the master coders and will consider reorganizing my content.
Title: Re: Can't select new content item category.
Post by: StefanSultanov on March 04, 2012, 10:17:14
Just to report regarding this issue.

Too many categories will block this field and thus, the function of your entire site.
Members won't be able to choose a category, when submitting new content.

I consider this problem solved.
Thank you very much for your help! Outstanding!