Hello

I am creating a page to let users preview a theme selecting it from a list. I plan to create a rule for each theme based on querystring.param to preview the proper theme according to the param sent by the user.

I tested with a few themes and it works just fine. But I have 200 themes, and after creating 181 rules (result from select count() from themekey_properties), when I try to create the rule number 182 the result page doesn't show any success message nor a failure message, it doesn't show either any kind of error in apache log, and it just the new rule is not created.

If I delete one of the existing rules then I can create that new rule successfully, so I figure it must be a size limit somewhere, but I cannot find the place that limit is set in code. Could you give me a hint?

Thank you in advance.

Best regards.

CommentFileSizeAuthor
#12 dump.sql_.gz3.93 KBklerigo
#6 1974966.patch723 bytesmkalkbrenner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkalkbrenner’s picture

Strange. AFAIK there's no limit in the code.

What happens exactly when you click save?
Do you see an error page or a white screen or the rule chain as normal?
Anything in the watchdog?

klerigo’s picture

Hello

Thanks for your reply.

No, there is no white screen, just the rule page as expected but without the "green" success message. There are no errors in apache log, about the watchdog, how do I check it?

Best regards.

mkalkbrenner’s picture

Watchdog is the internal drupal logger. In a standard installation you'll find it at /admin/reports/dblog

klerigo’s picture

Hello

Nothing in watchdog. I also emptied watchdog log and raised "error" again but nothing was writen.

I don't know if this would help. I deleted a few rules and then created new ones in their places without problems. All new rules created with weight -50 but last one, which was created as weight=51. After that rule, the misfunction started again, as it was number 181 rule. Updating manually weight to a different value (-49) didn't help either.

But I have found an error in apache log which didn't notice earlier on (sorry about that).

[Mon Apr 22 18:34:26 2013] [error] [client XX.XX.XX.XX] File does not exist: /www/sites, referer: http://website.com/subfolder/es/admin/config/user-interface/themekey/properties

My drupal install is on /www/subfolder/ where /www is documentroot, so the web root is on http://website.com/subfolder/. Have I found a bug that takes place when the site is not directly on document root? But, why doesn't it show creating the first 181 rules?.

I created a symbolic link to trick themekey but it didn't work as expected:

[Mon Apr 22 18:36:51 2013] [error] [client XX.XX.XX.X] Symbolic link not allowed or link target not accessible: /www/sites, referer: http://website.com/subfolder/es/admin/config/user-interface/themekey/properties

Does it make any more sense now? I don't even know if this path error has anything to do with it at all. Might it be an attempt to write to a temporary disk file to save memory when there are many rules? If so, I can't find where it is that code.

Best regards.

mkalkbrenner’s picture

The javascript based weight feature seems to be a suspect. But that's a core feature :-(
I'll have a look ...

mkalkbrenner’s picture

Category: support » bug
Status: Active » Needs review
FileSize
723 bytes

Are you able to test this patch if it solves your issue.

klerigo’s picture

Hello

Thanks for the patch, but it seems it makes no difference.

I applied the patch ("patch -b < 1974966.patch" being at themekey module folder), reloaded rules page (ctrl+F5) and tried to create a new rule. Same behaviour.

I have changed the document root in apache to host the site on / and I don't get the error message about "/sites" but the behaviour still hasn't changed. I cannot create more than 181 rules.

Any other idea? Do you want a dump of themekey_properties table to give it a try?

Best regards.

mkalkbrenner’s picture

reloaded rules page (ctrl+F5) and tried to create a new rule

You need to clear all drupal caches!

klerigo’s picture

All caching is disabled and I have run "empty all caches" at /admin/config/development/performance but it doesn't make any difference (I also logged out and logged back in, just in case).

klerigo’s picture

Hello

I ended up creating the missing rules directly into themekey_properties table.

Thanks for your help.

Best regards

mkalkbrenner’s picture

Status: Needs review » Active

Sorry, that I couldn't reply earlier.

I'm still interested in finding the cause for your issue. Can you provide me the dump?

klerigo’s picture

FileSize
3.93 KB

Hi

This is the table dump. The first 181 rows were the ones I got stuck at.

Best regards.

mkalkbrenner’s picture

Version: 7.x-2.3 » 7.x-3.x-dev
Status: Active » Postponed
mkalkbrenner’s picture

Issue summary: View changes
Status: Postponed » Closed (works as designed)

If you search across drupal.org issues you'll find a lot of issues like

  • unable to save a webform with more than 100+n items
  • unable to add more than 100+n fields to an entity
  • ...

Everytime the php vars limits in the php configuration cause the issue. I guess you ran into something similar.

Try to increase these values (if existing):

  • max_input_vars
  • suhosin.post.max_vars
  • suhosin.request.max_vars