maximum 23 attributes per class?

Author Message

Michal Slocinski

Tuesday 08 July 2008 2:20:50 pm

Hi,

I've problem with creating more than 23 attributes in a class (eZ Publish 4.0.1 rc1). Is it expected limitation, bug or maybe some problem with my setup?

Michal

Carlos Revillo

Tuesday 08 July 2008 2:58:18 pm

Hi. I'm working with a 30 attributes class. There are date attributes, object relation, object relations, xml blocks, images...
no problems with it. i didn't try to add more attributes, but it should work...
do you have content of this class? if so, how many objects of this class? i have 14.000 objects of the class i'm working. in previous steps, when i only had 25 or 26, if i tried to add another one, i was gettin a maximum time execution error...

Piotrek Karaś

Tuesday 08 July 2008 9:44:22 pm

Michal,

What are the symptoms exactly?
Classes with way more than 23 attributes are known to be used without problems.

Cheers,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kristof Coomans

Wednesday 09 July 2008 12:56:26 am

I believe this is this issue occuring: http://issues.ez.no/10203

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Michal Slocinski

Wednesday 09 July 2008 12:28:53 pm

Well, behavior is quite inconsistent - that's why I suspect it to be a bug.

I've class which is kind of form where most of these 23 attributes are supposed to collect information.

As long as class has 23 or less attributes all is fine.

Once I add 24th attribute (regardless of it's type) I can't save or cancel class editor form. Each time I press 'Save' or 'Cancel' I'm redirected back to edit class view.

When I try to add one more attribute, what happens is I'm redirected to edit class view again however there are still only 24 attributes while I'd expect to see 25.

Few minutes ago I just executed another test to see whether there is something wrong with this particular class or problem is more generic:
- create copy of Article class (standard Article as available in plain_site eZ Publish 4.0.1rc1 package)
- start adding 'Text line' attributes, none of them is configured to be information collector - just imagine copy of plain Article class with many additional 'text line' attributes added
- when I reach total amount of 25 attributes, I can't add anything more, I can't also Save or Cancel class editor view - I'm redirected back to page editor

I had some more time for debugging today so I looked as SQL queries executed when adding new attribute. I can see that when I add 25th attribute there is following insert to ezcontentclass_attribute table:

INSERT INTO ezcontentclass_attribute (serialized_name_list, version, contentclass_id, identifier, placement, is_searchable, is_required, can_translate, is_information_collector, data_type_string, data_int1, data_int2, data_int3, data_int4, data_float1, data_float2, data_float3, data_float4, data_text1, data_text2, data_text3, data_text4, data_text5) VALUES('a:2:{s:6:\"pol-PL\";s:14:\"nowy atrybut25\";s:16:\"always-available\";s:6:\"pol-PL\";}', 1, 27, '', 24, 1, 0, 1, 0, 'ezstring', 0, 0, 0, 0, 0.000000, 0.000000, 0.000000, 0.000000, '', '', '', '', '')

Now when I check DB, this row is there.

Next, when I try adding 26th attribute, there is no more INSERT, but I see all rows (including 25th) updated, like that - which is normal as I saw these updates each time I add any attribute:

UPDATE ezcontentclass_attribute
SET serialized_name_list='a:2:{s:6:\"pol-PL\";s:14:\"nowy atrybut25\";s:16:\"always-available\";s:6:\"pol-PL\";}', contentclass_id=27, identifier='mmmm', placement=24,
    is_searchable=1, is_required=0, can_translate=1, is_information_collector=0,
    data_type_string='ezstring', data_int1=0, data_int2=0, data_int3=0, data_int4=0,
    data_float1=0.000000, data_float2=0.000000, data_float3=0.000000, data_float4=0.000000,
    data_text1='mmmm', data_text2='', data_text3='', data_text4='', data_text5=''
WHERE  id='441' AND version='1'

I enabled debugging on all levels however I don't see there any errors, just these and other SQL queries plus some debugging information but no sign of error/warning messages apart of warnings related to i18n.

As you can see in two situations described above for my original class where I experienced this problem it occurred after 24 attributes and after I created copy of plain Article class it happened after 25 attributes. I went even further and created copy of standard Folder class and behavior was the same as with Article - no more than 25 attributes got created.

Let me know what you think, I'm happy to run some more tests or provide you more information if needed.

Michal Slocinski

Saturday 12 July 2008 11:10:57 am

I just confirmed exactly same problem on independent setup with eZ Publish 4.0 (my above posts were about 4.0 rc1).

Can anyone else confirm that this is a bug?

Piotrek Karaś

Sunday 13 July 2008 12:11:48 am

Have you tried different environment? So that to eliminate or confirm the problem of not having enough resources?

Have you tried, under the same environment, a fresh installation and there your tests?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Michal Slocinski

Sunday 13 July 2008 12:36:19 am

Yes, I tried and confirmed this:
- on different environment (independent machine, completely different website) using release 4.0
- on the same environment & machine, but fresh setup with migrated data and templates from original setup using 4.0.1rc1 where I spotted the problem for the first time

Looks like problem is (at least) from release 4.0 upwards.

Kristof Coomans

Monday 14 July 2008 2:30:23 am

Hi Michal

I just tested this with a new fresh content class on an eZ Publish install from trunk. No problems here though.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Piotrek Karaś

Monday 14 July 2008 7:52:50 am

The reason I asked for different configs is that we have at least 5-10 production sites running with eZ Publish 4.0.0 and have never come accross attribute count-related problem (even though other problems occur, for example custom datatype being able to mess up something for no good reason...). Just like Kristof, I wasn't able to force this problem myself.

What about a fresh install without data migration in the same environment?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Radek Kuchta

Monday 14 July 2008 11:32:44 am

Hi Michal,

I think, I have found the same problem. I had similar problem few days ago (only with FireFox ver. 3.0). I will check tomorrow this installation.

http://ez.no/certification/verify/272582

Michal Slocinski

Monday 14 July 2008 12:22:57 pm

Hmmm, although I use ff3 as my main browser after your post I tried also with ff2, ie7 and even opera 9.5 but everywhere I see the same issue.

Piotrek - I can see it on 2 completely independent setups, both without custom data types.

Surprisingly - after setting 4.0 up on my laptop running windows vista - all is fine (even with ff3), so it must me something dodgy elsewhere.

Anyway - good I found at least 1 way of achieving my goal - it looks like I'll end up with creating class on a laptop and exporting it.

If you find some pattern when does it happen and when not - please post it here. I'm quite convinced there is some bug but I can't come up with reliable replication steps as it seems to be running fine on one env but not on another. Perhaps some issue with particular PHP version? Both of my setups mentioned above are running under PHP 5.2.6

Piotrek Karaś

Monday 14 July 2008 12:28:20 pm

What about the environments? Any details, beside PHP version?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Michal Slocinski

Monday 14 July 2008 12:58:40 pm

Some more details:
- Apache 2
- running with Fast CGI
- 64MB for PHP scripts
- database: MySQL 5.0

Do you have some particular environment details in mind?

Piotrek Karaś

Monday 14 July 2008 1:08:38 pm

What OS? Have you tried raising the memory limit (128MB)?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Michal Slocinski

Monday 14 July 2008 1:39:19 pm

OS is FreeBSD.

Memory increase didn't change anything, I've also 64M on my laptop where each operation takes noticeably longer so I don't think it plays significant role in this case.

Jeroen van Duffelen

Thursday 26 February 2009 1:37:24 am

As I had this problem too, I posted an issue on the issue tracker. But Kristof helped me out here and told me it could be a problem with the PHP Suhosin Extension on the server.

It turned out that the Suhosin extension puts a max on the POST variables sent by a form.
I changed the standard settings of 200 vars to 400 and now I'm able to create classes with more than 23 attrs.

So for the ones who haven't found a solution yet, look at <b>suhosin.post.max_vars</b> in your suhosin settings.

Kristof Coomans

Thursday 26 February 2009 2:00:33 am

The issue Jeroen mentioned is here: http://issues.ez.no/IssueView.php?Id=14490

I filed an enhancement request, to let the eZ Publish setup wizard check for the Suhosin patch/extension and the specific settings that made editing class attributes fail: http://issues.ez.no/IssueView.php?Id=14298

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.