I get the following error:

Fatal error: Cannot unset string offsets in sites/all/modules/smart_paging/smart_paging.module on line 501
when adding manual

in body field. (I use wysiwyg - tinymce)

when i uncomment the line 501, I get a 'nice' error message, but stil not working.
Any idea on what's going wrong here?

This module sure looks promissing...good job.

Comments

arpeggio’s picture

Status: Active » Postponed (maintainer needs more info)

I'm using wysiwyg/tinymce too and I don't experience that error. Perhaps if you could give more details how to replicate the error.
We need the:

unset($options['query']['page']);

... to remove the ?page to all links of the current page and give way to SEO friendly paging URL.
Or try to use the 7.x-1.x-dev version and please share with us the result. Thanks.

h_dries’s picture

same problem in 7.x-1.x-dev

arpeggio’s picture

As I have mentioned, I didn't encountered that error with my site. Please provide us a detailed steps to replicate the issue. Thanks.

minorOffense’s picture

I'm getting the same error. Here's a stack trace:

( ! ) Fatal error: Cannot unset string offsets in /var/www/html/snowball/sites/snowstorm/modules/contrib/smart_paging/smart_paging.module on line 501
Call Stack
# Time Memory Function Location
1 0.0002 641936 {main}( ) ../index.php:0
2 1.9752 71281240 menu_execute_active_handler( ) ../index.php:21
3 2.2924 84047088 drupal_deliver_page( ) ../menu.inc:518
4 2.2924 84047512 drupal_deliver_html_page( ) ../common.inc:2437
5 2.2925 84048104 drupal_render_page( ) ../common.inc:2542
6 2.2925 84050928 block_page_build( ) ../common.inc:5497
7 2.2969 84194816 block_get_blocks_by_region( ) ../block.module:268
8 2.2969 84195032 block_list( ) ../block.module:315
9 2.2969 84195032 _block_render_blocks( ) ../block.module:658
10 2.2975 84199416 module_invoke( ) ../block.module:834
11 2.2975 84200096 call_user_func_array ( ) ../module.inc:795
12 2.2975 84200432 mobile_tools_block_view( ) ../module.inc:795
13 2.2975 84200432 mobile_tools_block_message( ) ../mobile_tools.module:191
14 2.2977 84201472 mobile_tools_switch_menu_link( ) ../mobile_tools.module:213
15 2.2977 84201680 url( ) ../mobile_tools.module:161
16 2.2977 84203112 drupal_alter( ) ../common.inc:2092
17 2.2977 84203216 smart_paging_url_outbound_alter( ) ../module.inc:1004

I'm running the latest version, viewing a blog list view, going from the first page to any subsequent page.

minorOffense’s picture

Seems to be related to the mobile tools block at the bottom. It's generating a link to go directly to the mobile version of the next page.

Here's the function that generates the link:

/**
 * Create the url to go to the desktop/mobile version
 */
function mobile_tools_switch_menu_link($site, $path, $options) {
  $url = '';
  switch($site) {
    case 'mobile':
      $url = variable_get('mobile_tools_mobile_url');
      break;
    case 'desktop':
    default:
      $url = variable_get('mobile_tools_desktop_url');
    
  }
  return url($url . '/' . $path, $options);
}

The current version of mobile tools requires a patch to get this code. See #1226580: function mobile_tools_switch_menu_link() doesn't exist with patch http://drupal.org/files/switch_menu_link-1226580-5055012.patch

arpeggio’s picture

@minorOffense sorry the patch you have posted is for mobile_tools module.