when content set to draft WSOD

Created on 7 September 2017, over 7 years ago
Updated 19 September 2024, 5 months ago

Hi,

The problem I'm having is when using workbench when saving as draft the URL reverts to the NID which causes the page the WSOD.

I've tried the working with the Action to take if filter value does not validate but that results in the view not displaying at all.

It doesn't seem to like the word, draft at the end of the node path,

this is ok, /node/759153/edit
this is not ok /node/759153/draft

I would have thought using hide view would have been the way to catch the error.
how do I configure this module to allow it to be viewed

this issue is this statement

  if ($result->fetchCol()) {
        $return = TRUE;
      }

this whole section seems unneeded as it isn't assessing the permissions correctly and returning a false value shouldn't result in a WSOD.

elseif (is_numeric($argument)) {
      // Node access isn't technically necessary for a single nid as views
      // permissions would not allow any data exposure.
      // That said, node access gives an expected experience as this validate
      // plugin will return FALSE if they don't have access.
      $result = db_select('node', 'n')
        ->addTag('node_access')
        ->condition('nid', $argument, '=')
        ->countQuery()
        ->execute()
        ->fetchField();

      
      if ($result->fetchCol()) {
        $return = TRUE;
     }
    }

and getting rid of the IF statement and just returning true resolves the issue.

Thu Sep 07 15:48:23.684138 2017] [:error] [pid 8394] [client 10.10.23.116:57026] PHP Fatal error: Call to a member function fetchCol() on string in /var/www/XXX-dev/public-html/sites/all/modules/contrib/views_url_path_arguments/views_plugin_argument_validate_url_path.inc on line 36, referer: http://XXXX.com/node/759153/edit

🐛 Bug report
Status

Closed: outdated

Version

1.1

Component

Code

Created by

🇦🇺Australia chaloum

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024