Comments

esoteric1’s picture

Assigned: Unassigned » esoteric1
esoteric1’s picture

Status: Active » Needs review
StatusFileSize
new19.91 KB

One issue i had with this is when I viewed an organization that had previously been created, the node page threw a bunch of errors but when I created a new organization and viewed it post-patch it was fine. maybe there are things that need to go in an update function?

esoteric1’s picture

Assigned: esoteric1 » Unassigned

Status: Needs review » Needs work

The last submitted patch, stormorganization-1848238-comment2.patch, failed testing.

juliangb’s picture

+++ b/stormorganization/stormorganization.info
@@ -2,6 +2,8 @@ name = Storm Organization
+dependencies[] = storm

Repeat of storm dependency.

+++ b/stormorganization/stormorganization.module
@@ -186,24 +177,11 @@ function stormorganization_menu() {
-  $items['admin/config/storm/organization'] = array(
-    'title' => 'Storm organization',
-    'description' => 'Storm organization administration page',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('stormorganization_admin_settings'),
-    'access arguments' => array('Storm: access administration pages'),
-    'type' => MENU_LOCAL_TASK,
-  );

Not sure we should be getting rid of this.

+++ b/stormorganization/stormorganization.module
@@ -513,10 +491,12 @@ function stormorganization_load($nodes) {
+    if($record) {    ¶

Trailing whitespace.

+++ b/stormorganization/stormorganization.views_default.inc
@@ -0,0 +1,124 @@
+  $handler->display->display_options['title'] = 'stormorganization_list';

This is what is failing the test - title of the page should be "Organizations"

+++ b/stormorganization/stormorganization.views_default.inc
@@ -0,0 +1,124 @@
+  ¶
+  $views[$view->name] = $view;
+  ¶

Trailing whitespace.

esoteric1’s picture

Status: Needs work » Needs review
StatusFileSize
new20.05 KB

Problems should be fixed. I will review again and see if there are any other issues.

esoteric1’s picture

Status: Needs review » Needs work

forgot the storm double dependency

esoteric1’s picture

Status: Needs work » Needs review
StatusFileSize
new20.02 KB
esoteric1’s picture

I need to get better at making it right the first time...

esoteric1’s picture

Status: Needs work » Needs review

still one damned whitespace. is there a vim command to show whitespaces as big obnoxious blocks?

Status: Needs review » Needs work

The last submitted patch, stormorganization-viewslist-1848238-comment9.patch, failed testing.

juliangb’s picture

Status: Needs review » Needs work

The last submitted patch, stormorganization-viewslist-1848238-comment9.patch, failed testing.

esoteric1’s picture

Status: Needs work » Needs review
StatusFileSize
new19.94 KB

Maybe this will work?

juliangb’s picture

Status: Needs review » Needs work

Actually, fewer comments than I thought - let me test before you worry about reposting...

+++ b/stormorganization/stormorganization.info
@@ -2,6 +2,7 @@ name = Storm Organization
 dependencies[] = storm
 package = Storm
+dependencies[] = views
 core = 7.x

Very minor - makes sense if we put the dependency lines together.

+++ b/stormorganization/stormorganization.module
@@ -185,8 +176,7 @@ function stormorganization_menu() {
-  $items['admin/config/storm/organization'] = array(
+  $items['admin/config/storm/organization/'] = array(

As you commented in IRC, shouldn't add a slash here.

+++ b/stormorganization/stormorganization.module
@@ -513,10 +498,12 @@ function stormorganization_load($nodes) {
+    if($record) {    ¶

Whitespace, but less important - I can fix this on commit if vim is giving trouble.

esoteric1’s picture

Status: Needs work » Needs review
StatusFileSize
new19.81 KB

well lemme submit what i think is a working patch and then if there are more issues... go for it.

juliangb’s picture

As discussed in IRC, it'd be great if the view was closer to the D6 one:
- Country field rather than description
- Edit / delete links in one column separated by a space

Thanks!

esoteric1’s picture

StatusFileSize
new19.77 KB

another doomed attempt :)

juliangb’s picture

Status: Needs review » Needs work

Last thing I think we should do before committing this is ensure the edit / delete links are in the same column - I get the Operations column but with only the edit link in it from the below patch.

Also - quick question:

+++ b/stormorganization/stormorganization.module
@@ -513,10 +498,12 @@ function stormorganization_load($nodes) {
+    $record = array();
     $record = $result->fetchAssoc();
-
-    foreach ($record as $key => $value) {
-      $node->$key = $value;
+    if($record) {
+      foreach ($record as $key => $value) {
+        $node->$key = $value;
+      }

Why this change?

esoteric1’s picture

I had a warning that said invalid argument supplied to foreach(), i tried to declare it as an array but then putting that in worked to remove the warning. I didn't think that could ever be a problem?

my understanding was the if($record) would only check to see if there was some data there... if there wasnt any data there then it wouldnt create any problems.

Also, to be honest i manually edited the view after generating it from the views Ui so I may have missed a line. I will go over it again tomorrow if you'd like. On my dev server it was working. but I will go over it again.

esoteric1’s picture

Status: Needs work » Needs review
esoteric1’s picture

Status: Needs review » Needs work

oops forgot to double check the column thing. doing that now

esoteric1’s picture

Status: Needs work » Needs review
StatusFileSize
new20.03 KB

Hopefully no whitespaces. I also added the menu entry for organizations (through the view) so it should appear in the navigation menu like before.

esoteric1’s picture

Assigned: Unassigned » esoteric1
esoteric1’s picture

Assigned: esoteric1 » Unassigned
juliangb’s picture

Thanks - will review this again when I'm next coding for Storm.

juliangb’s picture

StatusFileSize
new20.02 KB

Amended patch to combine the columns.

juliangb’s picture

Status: Needs review » Fixed

Have committed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.