I can add only one rule to chain. Not much of a chain, is it ;) It could be UI problem, but hard to tell without investigation.
| Comment | File | Size | Author |
|---|
I can add only one rule to chain. Not much of a chain, is it ;) It could be UI problem, but hard to tell without investigation.
| Comment | File | Size | Author |
|---|
Comments
Comment #1
mkalkbrennerVery strange. You entered a second rule, but it won't be saved?
Any error message in the watchdog?
Comment #2
henrijs.seso commentedI investigated little further, rules are saved but not displayed. I added multiple rules and only first showed up, then I started to delete and I could delete them all, but one by one. Once I delete rule, next one is shown, single in list.
I will test on clean install thou, site I am working on is far from that.
(Also didn't mean to change status back)
Comment #3
henrijs.seso commentedAhh, I'm sorry, clean install works as designed. Oh, well, debugging ensues.
Comment #4
henrijs.seso commentedWell, site I am working on is an edge case, with Oracle database and stuff. There appears to be a problem on some environments where doing
db_selectmultiple times (during recursion) overwrites results and only first result is processed. I managed to fix this problem by improving recursive function so that it works both on clean D installation and in my environment. It will splitthemekey_load_rulesin two functions wheredb_selectwill always return just one level of results.Please review and comment, I will check out other places where
db_selectand recursion is used, if any.Comment #5
mkalkbrennerI don't know if it's really a limitiation of the Oracle DB itself, but for me it sounds like a bug in the drupal oracle db driver. Which one do you use?
Comment #6
henrijs.seso commentedI was using Oracle driver 1.9 and updated to dev version. Problem persistent in both. I can get chain to work well in both oracle versions and clean install with mysql with patch only.
In fact I could get module to work with oracle with super small change, just adding
clonebeforedb_select, but that would make it broken on clean installs with mysql. This makes me think that it has something to do with this core bug https://drupal.org/node/1671848. Or not.If you look at proposed patch, it makes code a little longer, but should not be hackish. Just using different recursion type (not an expert thou).
Comment #7
mkalkbrennerThemeKey stores a tree in table and uses this recursive function to load the tree:
As described in comment #4, this function fails using the oracle driver.
But it works since year for drupal 6 and 7 with MySQL.
I'm interested in your opinion and therefor shift that issue to the oracle driver issue queue.
For discussions about creating a workaround within ThemeKey I opened #2024915: rule chain storage refactoring.
Comment #8
aaaristo commentedIn my opinion this should work... I think even the core does recursive db_selects for the menu system...
Could someone provide a testcase?
Comment #9
aaaristo commentedComment #10
henrijs.seso commentedI am interested in providing testcase. In what form would that be? Project I am working on has rather restrictive environment, but Ill do my best to help here.
Comment #11
aaaristo commentedmay be a simple php file i can launch with "drush src test.php"
that makes a recursive query on some standard drupal table...
Comment #12
bohartD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patches/suggestions above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!