ProsePoint Express: hosted newspaper website content management software

Other stories addition possible list item bug?

  • strict warning: Non-static method view::load() should not be called statically in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/handlers/views_handler_argument.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/modules/node/views_handler_filter_node_status.inc on line 0.
  • strict warning: Non-static method view::load() should not be called statically in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 0.
  • strict warning: Declaration of date_api_filter_handler::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/date/includes/date_api_filter_handler.inc on line 0.
  • strict warning: Non-static method view::load() should not be called statically in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/views.module on line 879.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/prosepoint.org/bzr/public_html/profiles/prosepoint/modules/views/plugins/views_plugin_row.inc on line 0.
1 reply [Last post]
davo
User offline. Last seen 7 years 29 weeks ago. Offline
Joined: 02/03/2009
Posts:

When a user adds multiple 'other stories' in a sub-block, then deletes the contents of the field and saves, empty LI attributes are added to the rendered source

<li></li>
<li></li>
<li></li>
<li class="last"></li>

These are rendered as extra rows for the empty list items in explorer pushing down designs and creating 'space', but does not show in Firefox.

I think actually in this case, Explorer is correct in rendering the spacing for the list items, where firefox has bugs which hide the effect :

https://bugzilla.mozilla.org/show_bug.cgi?id=179596

https://bugzilla.mozilla.org/show_bug.cgi?id=221855

I am not familiar enough with the codebases to understand the implications of the storage of the data, but it looks like those fields are stored if 'added' on the edit form, even without content in them ..

I will try and investigate further to see if this is a valid issue.

beng
User offline. Last seen 4 years 31 weeks ago. Offline
Joined: 27/02/2009
Posts:
...

Hi,

Sorry for the delay in responding. I got pulled away to do some other stuff over the last few weeks. Anyway, I have committed a fix which will be incorporated in the next version of ProsePoint, whenever that will be.

If you want to patch your own system to test, please be very welcome to.

In the file .../profiles/prosepoint/modules/prosepoint/prosepoint_channel/pp_cs.module, starting at line 162, replace the function pp_cs_subblock_settings_form_submit() with the following:

function pp_cs_subblock_settings_form_submit($form, &$form_state) { 
  // Compose the settings we want to save
  $settings = array(
    'title' => $form_state['values']['title'],
    'mode' => $form_state['values']['mode'],
    'view' => $form_state['values']['view'],
    'count' => $form_state['values']['count'],
    'edition_nid' => $form_state['values']['edition_nid'],
  );
  $settings['field_headlines'] = $form_state['values']['field_headlines'];
  $settings['field_stories'] = $form_state['values']['field_stories'];

  // Delete the stuff we don't want to save
  unset($settings['field_headlines']['field_headlines_add_more']);
  foreach ($settings['field_headlines'] as $k => $v) {
    if (empty($settings['field_headlines'][$k]['nid'])) {
      unset($settings['field_headlines'][$k]);
      continue;
    }
    unset($settings['field_headlines'][$k]['_error_element']);
  }

  unset($settings['field_stories']['field_stories_add_more']);
  foreach ($settings['field_stories'] as $k => $v) {
    if (empty($settings['field_stories'][$k]['nid'])) {
      unset($settings['field_stories'][$k]);
      continue;
    }
    unset($settings['field_stories'][$k]['_error_element']);
  }

  // Sort by _weight
  usort($settings['field_headlines'], '_content_sort_items_helper');
  usort($settings['field_stories'], '_content_sort_items_helper');
 
  $data = array('settings' => $settings);
  db_query("UPDATE {node_composite_references} SET data = '%s' WHERE vid = %d AND id = '%s'", serialize($data), $form_state['values']['vid'], $form_state['values']['id']);
 
  // Clear the page and block caches.
  cache_clear_all();
  $form_state['redirect'] = 'node/' . $form_state['values']['nid'] . '/composite_zones';
}

In other words, just copy and paste the entire function.

Thanks for posting this.