Hello,

I have just added a quick fix which seems to be working on Drupal 7.
I have committed it to the git repository.

Basically, it is only modifying core=6.x into core=7.x.

If I find any problems, I'll trying posting a patch.

Bye.

Comments

fe_lix_’s picture

StatusFileSize
new262 bytes

Here is the patch file.

basicmagic.net’s picture

subscribe

chalk’s picture

@fe_lix_ Your patch work, but after installing I have messages "Notice: Undefined index". To fix them find in views404.module 13 line and replace:

if(isset($view->display_handler->options['path'])){
  $path = $view->display_handler->options['path'];
}
gpmaker’s picture

Thank you @Chalk, it work like a charm =)

gpmaker’s picture

Guys let's post the version for 7.x

kalis1’s picture

Marked #908922: drupal 7 port or Views 6.x/7.x as duplicate of this issue.

bago’s picture

I'm using this (#1 + #3) and I'm very happy.
I found that ajax preview in views 3.4/3.5 is broken by this module so I added a specific check in the pre_view hook (lines starting with +):

/**
 * Implementation of hook_views_pre_view().
 */
function views404_views_pre_view(&$view) {
  if (isset($view->display_handler->options['path'])) {
    $path = $view->display_handler->options['path'];
  } else {
    return;
  }
  if (!empty($path)) {
    $path_array = explode('/', $path);
    $args = array_filter(arg());

+    $argpath = implode('/', arg());
+    if (strpos($argpath, 'admin/structure/views/') === 0 && strpos($argpath, '/preview/')) {
+      return;
+    }

    $matched = array_intersect($path_array, $args);
    $conflicting_in_view = array_diff($path_array, $matched);
    $conflicting_in_args = array_diff($args, $matched);
    $view_arguments = $view->display_handler->options['arguments'];

We should really make this code into git and have a proper 7.x release of this useful module!

makangus’s picture

StatusFileSize
new2.19 KB

Rolled a patch with @fe_lix_, @Chalk and @bago's input with a few things to fix some PHP notices.

plazik’s picture

Thanks makangus.
It works for me (patch for dev version).

It's time for 7.x-dev version.

makangus’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev

The patch #8 is against dev.

eule’s picture

work this with views 3 ??

plazik’s picture

Yes, it works.

eule’s picture

hi plazik

which patch you applied?

plazik’s picture

hass’s picture

Assigned: fe_lix_ » Unassigned
StatusFileSize
new2.02 KB

Patch in #8 does not apply here against latest DEV. Reroled.

hass’s picture

Added package Views.

hass’s picture

Status: Needs review » Reviewed & tested by the community
eule’s picture

thx hass, plazik

switching to new theme and have a lot to reorganize...test it in a couple of days

hass’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -7.x

Status: Fixed » Closed (fixed)

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