Closed (fixed)
Project:
Skinr
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Oct 2010 at 22:23 UTC
Updated:
3 Jan 2014 at 02:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ericduran commentedworking on this. Patch soon.
Comment #2
ericduran commentedThis definitely requires test. Also when testing this patch make sure you run update.php I alter the skinr_rules table to in order to add an extra field for the content type settings.
Comment #3
ericduran commentedHere's a cleaner patch. I left some unused code in there before.
Comment #5
ezra-g commentedThe previous patches failed automated testing because they couldn't be automatically applied.
Here's a re-roll that should apply. I haven't performed a functional test on this.
Comment #6
ericduran commentedSweet, testing is on.
Comment #7
jacineSomehow this stops the Skinr settings fieldset from displaying.
I think we also need to provide JavaScript for the Vertical tabs, so that the summary shows in the tabs. We should just be able to steal code from the block module.
Comment #8
ericduran commentedYeah, after submitting the patch I realized the vertical tabs isn't being updated when we change value like in every other vertical tabs implementation. I'll submit a new patch later.
Comment #9
ericduran commentedUpdated patch to add the js file. JS works like the blocks js.
Not sure about the fieldset disappearing :-/
Sorry for being lazy and not setting up fakeadd.
Comment #10
ericduran commentedmy js file disappear.
Comment #11
jacineThe vertical tabs are great, but this is totally broken. I tried each of these separately, even clearing cache between applying settings to be sure and this is what I found:
The code needs updating. This is still lots of D6 code.
Comment #12
jacineComment #13
sunThis line is not copied from Block module... is it?
arg() is out.
Powered by Dreditor.
Comment #14
ericduran commented@sun, I do not remember. But it does not look like is there now.
Comment #15
moonray commentedLooks like that line comes (sort of) from
node_block_list_alter()in node.module.EDIT: What do you mean with "arg() is out." exactly?
Comment #16
moonray commentedIn the meantime, here's a working patch. All code in
skinr_rule_is_visible()was lifted from node.module and block.module (including thearg()stuff).EDIT: You'll need to manually add the new field to your DB or reinstall skinr to properly test this.
EDIT 2: Ran tests locally. All tests passed.
Comment #17
rickmanelius commentedWhat can I do to test? Role and/or page? Or is it good already?
Comment #18
jacine@rickman You can do the steps I did in #11 and see if all is well. I have not been able to test @moonray's patch yet, but that's what I would end up doing because last time I checked none of that was working properly. I'd make sure it passes tests locally. To do this, you turn on the Simpletest module, go to the test page, and select only Skinr's tests and run them.
Comment #19
rickmanelius commentedMy tests show only 2 of the 3 items shown in #11 work. Filtering by content type still doesn't work totally.
Content type + region fails (displays on page and article even though article is the only one checked)
Roles work (set for admin only and not logged in didn't see it)
Urls work (node/1 was set and it showed up there, but node/2 didn't have it as expected)
As for simpletest, I've never used it. But having installed and run the entire set of tests, I didn't see an error that specifically noted 'skinr'. If there is some way to just run the skinr.test file, let me know and i'll take care of it. In the documentation and in the area to run the tests, I was unable to specify or see any results specifically noting skinr.
Comment #20
jacineThank you @rickman! Your review is much appreciated ;)
As far as simpletest goes, you definitely don't need to run all of the tests. That takes ages! If you go to admin/config/development/testing, you'll see a bunch of checkboxes. What you need to do is check the "skinr" checkbox, and then click "Run tests." This will run only Skinr's tests and will let you know whether they pass or fail. If the tests fail, then the patch likely needs work.
Comment #21
moonray commentedFinally some testers! :-)
Will look at the issues you found as soon as I get some time.
Comment #22
rickmanelius commented@jacine
No problem. This is a great module and my team and I are planning on using it for future clients and are thus investing our time and energy now to learn it (and help develop it) so that it can be ready for prime time for our next client!
Re:simpletest. I wonder if there is an issue with that module itself because I only see the following (attached screenshot). That is why I'm not sure if it's correctly running the skinr test file. I know this isn't the proper queue to address that, but thus far, I'm unable to get a skinr check box to appear in the simpletest area (even having uninstalled simpletest and skinr/skinr ui).
I'm running 7.x-2.x-dev (March 4) skinr and simpletest 7.x-2.0
Comment #23
branana commentedWhat version is #16 supposed to apply against?
branbot:skinr bran$ git apply skinr_943068_16.patch
fatal: git diff header lacks filename information when removing 1 leading pathname components (line 70)
Comment #24
branana commentedDrupal 7 checkbox values are stored different, the "checked" items and "unchecked" items both get indexed now.
first patch is on top of the patch in comment #16
the second patch is against the HEAD (master)
Comment #25
branana commentedComment #26
moonray commentedI decided to write a bunch of tests to automate testing of rules functionality. As a result I uncovered several bugs, which I then fixed. I've also added validation for saving rules to avoid potential issues.
See full list of changes at https://github.com/moonray/skinr/pull/4/files
Regular patch was attached as well.
Comment #27
nomonstersinme commentedThis patch seems to work but I get an undefined property notice after creating a rule that has a visibility setting to show only on the front page:
Notice: Undefined property: stdClass::$node_types in skinr_rule_load_multiple() (line 293 of /Users/admin/Sites/drupal7/sites/all/modules/skinr/skinr.module).looked at the code here and its way above my head.. :/
Comment #28
moonray commentedYou'll need to disable, uninstall, then install skinr to test this patch properly (there were some DB changes). If you don't, you'll indeed get the above notice.
Comment #29
moonray commentedUpgrading this issue to major.
Comment #30
Hari commentedSeems to be a minor mismatch in the patch but it looks like a non issue. Lines 94 and 95 patch call for
Latest version of head currently has line 95 in skinr.test as
'description' => 'Tests Skinr API functionality.',Anyways shouldn't be an issue I don't think except that it threw me an error when patching.
Comment #31
Hari commentedWas in the middle of trying to create a rule when I decided I didn't want to make that rule and would rather start over. Trying to delete yielded the following message.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7.skinr' doesn't exist: DELETE FROM {skinr} WHERE (module = :db_condition_placeholder_0) AND (element = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => page [:db_condition_placeholder_1] => 1 ) in skinr_rule_delete() (line 332 of /Users/Hari/Sites/drupal-7.0/sites/all/modules/skinr/skinr.module).
Not critical but worth mentioning so that it can be accounted for.
Comment #32
moonray commented#31 is a different (though related) issue. It's a one line fix that I've committed as well (which should have been part of a previous patch).
Again, moving forward by committing this patch. If there are any problems, post a bug report. :)
Note: this requires a re-installation of Skinr due to more DB changes.