Hi,

Great module but I have encountered what I think is a bug.

When you create a path it states 'The URL reported by this block. Leave blank to return the URL of the page in which the block is embedded.'

But on leaving the field blank the path defaults to the view edit page – in my instance:

'admin/structure/views/view/contract_service_finder/edit/block_path_1'

I'm using alpha1, not sure if this has been fixed in dev?

S

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

So, just to build on this a little more...

If you delete the path in the db then the module works (with a serialization error).

The main problem (I think) is because views won't let you have a display without a path (just like a page display).

If the path field could be left empty then I think this will work.

S

Anonymous’s picture

Changing line 85 gets me half of the way there...

return empty($this->options['path']) ? '' : $this->get_option('path');

Unfortunately, you can't save the view and get the error:

'Display "Block Path" uses a path but the path is undefined.'

If I can get round this then I think it's fixed.

S

jags880’s picture

Did you ever figure this out? I'm having the same issue.

Anonymous’s picture

Yeah I did but the above code doesn't fully solve the problem but it goes some way to fixing it.

If you're still stuck I'll dig out the code I used on the prod site.

S

Samfall’s picture

I've written a patch that solved the problem for me.

It seemed to me that the line that swilson highlighted in #2 is using terminology from Drupal 6: $_GET['q'] instead of the more current request_path(). Perhaps when the program was migrated to Drupal 7, this line stopped working as desired. Also, the program was autofilling the value in, and I had to tell it to stop autofilling the value and accept "None" as a valid option (and not throw an error for it).

Check the code and test it to see if it works for you.

After installing the patch, make sure you go back to the view you wish to change and delete the autofilled path so that it says "None".