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.

Jobs buttons not working correctly when viewing a specific printer #3436

Closed

Description

@michaelrsweet

Version: 1.4.2
CUPS.org User: pdulaba

OS: SLES 10sp2 (i586)
OS: Mac OS X 10.6.2

After selecting a printer to view under the Printers tab in the web interface; the "Show Completed Jobs', "Show All Jobs" and "Show Active Jobs" buttons do not behave properly. They should be showing results based on the specific printer selected, but they are showing results globally across all printers.

This is pure speculation, but it appears that the printer_name and printer_uri_supported variables in the jobs-header.tmpl are being ignored or are not passed properly to the cgi.

Activity

  1. michaelrsweet commented on Dec 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    This appears to be a regression in the fix for STR #3367.

  2. michaelrsweet commented on Dec 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    OK, not a regression - this bug has been there since 1.4.0 and is a template bug. Fix coming up...

  3. michaelrsweet commented on Dec 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Hmm, I take that back; it could work in 1.4.0, but only by accident. Definitely a regression, though...

  4. michaelrsweet commented on Dec 7, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  5. michaelrsweet commented on Nov 3, 2010

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: jp107

    For reference the patch I just uploaded is a hack which seems to work on older versions of cups, in particular the 1.3.7 included by RH in their EL5 package. At least it seems to work ok for me.

  6. michaelrsweet commented on Nov 3, 2010

    @michaelrsweet
    ContributorAuthor

    "str3436.patch":

    Index: cgi-bin/ipp-var.c

    --- cgi-bin/ipp-var.c (revision 8900)
    +++ cgi-bin/ipp-var.c (working copy)
    @@ -333,7 +333,7 @@
    NULL, job_uri);
    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,

    "requested-attributes", NULL, "job-printer-uri");

    •  if ((response = cupsDoRequest(http, request, "/")) != NULL)
       {
         if ((attr = ippFindAttribute(response, "job-printer-uri",
      

    @@ -926,7 +926,7 @@
    ishttps ? "https" : "http",
    userpass, hostname, port, resource);
    else

    • snprintf(url, urlsize, "%s://%s:%d%s",
    • snprintf(url, urlsize, "%s://%s:%d%s",
      ishttps ? "https" : "http",
      hostname, port, resource);
      }
      @@ -1518,7 +1518,11 @@
      */

    if (dest)

    • {
      snprintf(val, sizeof(val), "/%s/%s", section, dest);
    •  cgiSetVariable("PRINTER_NAME", dest);
      
    •  cgiSetVariable("PRINTER_URI_SUPPORTED", val);
      
    • }
      else
      strlcpy(val, "/jobs/", sizeof(val));
  7. michaelrsweet commented on Nov 3, 2010

    @michaelrsweet
    ContributorAuthor

    "cups-str3436.patch":

    --- cups-1.3.7/cgi-bin/ipp-var.c.str3436 2010-10-29 18:52:20.000000000 +0100
    +++ cups-1.3.7/cgi-bin/ipp-var.c 2010-10-29 19:46:50.000000000 +0100
    @@ -1353,7 +1353,12 @@
    else
    {
    if (dest)

    •  {
      
    •    snprintf(url, sizeof(url), "/%s/%s", section, dest);
      
    • cgiSetVariable("PRINTER_NAME", dest);
    • cgiSetVariable("PRINTER_URI_SUPPORTED", url);
      snprintf(url, sizeof(url), "/%s/%s?", section, dest);
    •  }
      
      else
      strlcpy(url, "/jobs/?", sizeof(url));
  8. 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