Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

selecting "Maintenance" from the dropdown list results in Error #3345

Closed

Description

@michaelrsweet

Version: 1.4.1
CUPS.org User: nassarmu

In the printer screen on the web GUI when selecting an item from the Maintenance dropdown list(like Print Test Page) and then using the browser back button attempting to select "Maintenance" from the drop down list results in an error page

Error:
Unknown operation ""!

no errors are recorded in the error_log, the error log for this operation is attached.

This bug came up when I had the need to send multiple test pages, the dropdown list makes it harder to resend the "Print Test Page" command repeatedly.

This was tested on SLE 11 and Ubuntu 9.04.

Activity

  1. michaelrsweet commented on Oct 2, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    What browser are you using?

  2. michaelrsweet commented on Oct 2, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: nassarmu

    Tested on Firefox 3.0.13 and 3.5.3. Also tested on Konqueror 4.1.3.

  3. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    OK, the Javascript needs to not submit if the first item is chosen.

  4. michaelrsweet commented on Jan 11, 2011

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  5. michaelrsweet commented on Jan 11, 2011

    @michaelrsweet
    ContributorAuthor

    "str3345.patch":

    Index: cgi-bin/printers.c

    --- cgi-bin/printers.c (revision 9461)
    +++ cgi-bin/printers.c (working copy)
    @@ -1,9 +1,9 @@
    /*

    • "$Id$"
      *
      • * Printer status CGI for the Common UNIX Printing System (CUPS).
      • * Printer status CGI for CUPS.
        *
      • * Copyright 2007-2008 by Apple Inc.
      • * Copyright 2007-2011 by Apple Inc.
    • Copyright 1997-2006 by Easy Software Products.
    • These coded instructions, statements, and computer programs are the
      @@ -148,7 +148,21 @@
      }
      else if (printer)
      {
    • if (!strcmp(op, "start-printer"))
    • if (!*op)
    • {
    •  const char *server_port = getenv("SERVER_PORT");
      
    •               /\* Port number string */
      
    •  int  port = atoi(server_port ? server_port : "0");
      
    •                   /\* Port number */
      
    •  char uri[1024];      /\* URL */
      
    •  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
      
    •          getenv("HTTPS") ? "https" : "http", NULL,
      
    •          getenv("SERVER_NAME"), port, "/printers/%s", printer);
      
    •  printf("Location: %s\n\n", uri);
      
    • }
    • else if (!strcmp(op, "start-printer"))
      do_printer_op(http, printer, IPP_RESUME_PRINTER,
      cgiText(_("Resume Printer")));
      else if (!strcmp(op, "stop-printer"))
    # Index: cgi-bin/admin.c
    
    --- cgi-bin/admin.c (revision 9461)
    +++ cgi-bin/admin.c (working copy)
    @@ -145,7 +145,30 @@
    
    fprintf(stderr, "DEBUG: op=\"%s\"...\n", op);
    
    • if (!strcmp(op, "set-allowed-users"))
    • if (!*op)
    • {
    •  const char *printer = getenv("PRINTER_NAME"),
      
    •               /\* Printer or class name */
      
    •   *server_port = getenv("SERVER_PORT");
      
    •               /\* Port number string */
      
    •  int  port = atoi(server_port ? server_port : "0");
      
    •                   /\* Port number */
      
    •  char uri[1024];      /\* URL */
      
    •  if (printer)
      
    •    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
      
    •                getenv("HTTPS") ? "https" : "http", NULL,
      
    •        getenv("SERVER_NAME"), port, "/%s/%s",
      
    •        cgiGetVariable("IS_CLASS") ? "classes" : "printers",
      
    •        printer);
      
    •  else
      
    •    httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri),
      
    •               getenv("HTTPS") ? "https" : "http", NULL,
      
    •       getenv("SERVER_NAME"), port, "/admin");
      
    •  printf("Location: %s\n\n", uri);
      
    • }
    • else if (!strcmp(op, "set-allowed-users"))
      do_set_allowed_users(http);
      else if (!strcmp(op, "set-as-default"))
      do_set_default(http);
      Index: cgi-bin/classes.c
      ===================================================================
      --- cgi-bin/classes.c (revision 9461)
      +++ cgi-bin/classes.c (working copy)
      @@ -1,9 +1,9 @@
      /*
    • "$Id$"
      *
    • * Class status CGI for the Common UNIX Printing System (CUPS).
    • * Class status CGI for CUPS.
      *
    • * Copyright 2007-2008 by Apple Inc.
    • * Copyright 2007-2011 by Apple Inc.
      • Copyright 1997-2006 by Easy Software Products.
      • These coded instructions, statements, and computer programs are the
        @@ -147,7 +147,21 @@
        }
        else if (pclass)
        {
    • if (!strcmp(op, "start-class"))
    • if (!*op)
    • {
    •  const char *server_port = getenv("SERVER_PORT");
      
    •               /\* Port number string */
      
    •  int  port = atoi(server_port ? server_port : "0");
      
    •                   /\* Port number */
      
    •  char uri[1024];      /\* URL */
      
    •  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
      
    •          getenv("HTTPS") ? "https" : "http", NULL,
      
    •          getenv("SERVER_NAME"), port, "/classes/%s", pclass);
      
    •  printf("Location: %s\n\n", uri);
      
    • }
    • else if (!strcmp(op, "start-class"))
      do_class_op(http, pclass, IPP_RESUME_PRINTER, cgiText(("Resume Class")));
      else if (!strcmp(op, "stop-class"))
      do_class_op(http, pclass, IPP_PAUSE_PRINTER, cgiText(
      ("Pause Class")));
  6. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions