Installation

Upgrade to 2.19: displaying tables and correct answers

Upgrade to 2.19: displaying tables and correct answers

by Peter Lert -
Number of replies: 8

We recently installed v2.19 and are working to upgrade from v2.16. Some issues we are seeing in testing are related to display of tables and display of correct answers. Any clues about how to fix them would be GREATLY appreciated. Details below.

[Note: just after posting this I also learned that help boxes are not working - there's no response when clicked. Sounds related?]

I used a modification of the "enter pi" sample PGML problem, combined with a code snippet from an OPL problem (wriitten using PG), to illustrate the issues. My code is here:

    #############
    DOCUMENT();
    loadMacros(
        "PGstandard.pl",    # Standard macros for PG language
        "PGML.pl",          # PGML markup and Math Objects
        "PGcourse.pl",      # Customization file for the course
    );
    $pi = Real("pi");
    $y1=random(5, 20, 1);
    $y2=random(21, 50 , 1);
    $y3=random(51, 80 ,1);
    $y4=random(81,100, 1);
    $y5=random(101, 120, 1);
    @row1_1= ("\(t\) (seconds)", "0", "1", "2", "3", "4", "5");
    @row1_2= ("\(s\) (feet)", 0, $y1, $y2, $y3, $y4, $y5);
    BEGIN_PGML
    Enter a value for [`\pi`].
    [_]{$pi}{5}  
    showCorrectAnswers = [$showCorrectAnswers]  
    showSolutions = [$showSolutions]  
    displayMode = [$displayMode]
    END_PGML
    TEXT(beginproblem());
    BEGIN_TEXT
    \{&begintable(scalar(@row1_1)+1)\}
    \{&row(@row1_1)\}
    \{&row(@row1_2)\}
    \{&endtable()\}
    END_TEXT
    BEGIN_PGML_SOLUTION
    You could type [|pi|]* or [|3.14|]*, or [|22/7|]*,
    among other options.
    END_PGML_SOLUTION
    ENDDOCUMENT();
    #############

When this code is in the Problem Editor, no answer is entered, and the Show Correct Answer button is clicked the output is:

(Similar results obtain when an answer is entered - the entered answer remains showing in the answer box). It's also the case that the Solution link generates no response.

Using Generate Hardcopy the pdf shows the table correctly, along with the correct answer (showCorrectAnswers=2 because I am using an admin account?):

Setting the display mode in the editor to tex produces this output (showCorrectAnswers=0 because the problem must reload to display tex mode):

    {\pgmlSetup
    Enter a value for \(\pi\).
    \vskip\baselineskip
    {\answerRule[AnSwEr0001]{3}}
    \vskip\baselineskip
    showCorrectAnswers = 0\pgmlBreak
    showSolutions = 1\pgmlBreak
    displayMode = TeX
    \vskip\baselineskip
    \par}%

    \par\smallskip\begin{center}\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline

    \(t\) (seconds) &0 &1 &2 &3 &4 &5 \\ \hline 

    \(s\) (feet) &0 &15 &30 &60 &91 &107 \\ \hline 


    \end {tabular}\end{center}\par\smallskip



    %%% BEGIN SOLUTION
    \par\smallskip{\bf Solution: }
    {\pgmlSetup
    You could type {\tt{}pi} or {\tt{}3.14}, or {\tt{}22/7},
    among other options.
    \par}%
    \par\medskip
    %%% END SOLUTION
Enter a value for \(\pi\).
\vskip\baselineskip
{\answerRule[AnSwEr0001]{3}}
\vskip\baselineskip
showCorrectAnswers = 0\pgmlBreak
showSolutions = 1\pgmlBreak
displayMode = TeX
\vskip\baselineskip
\par}% \par\smallskip\begin{center}\begin{tabular}{|c|c|c|c|c|c|c|c|} \hline \(t\) (seconds) &0 &1 &2 &3 &4 &5 \\ \hline \(s\) (feet) &0 &15 &30 &60 &91 &107 \\ \hline \end {tabular}\end{center}\par\smallskip %%% BEGIN SOLUTION
\par\smallskip{\bf Solution: }
{\pgmlSetup
You could type {\tt{}pi} or {\tt{}3.14}, or {\tt{}22/7},
among other options.
\par}%
\par\medskip
%%% END SOLUTION 

With the code in Undefined Set:Problem 1 and loaded as in an assignment, the Show Correct Answers button gets the same result as shown above for the code in the editor, except showCorrectAnswers=2 as in the pdf output. Debug output for PG Info and Answer Hash Info is below (with the parser-related answer hash omitted, since the lengthy list is essentially all "too deep")

    Form variables

    AnSwEr0001  =>  
    MaThQuIlL_AnSwEr0001    =>  
    displayMode =>  
    effectiveUser   =>  Peter.Lert
    key =>  NEgRZwEbPDc5AZeudU3P17xiT39PPYno
    num_attempts    =>  2000
    passwd  =>  
    previous_AnSwEr0001 =>  
    problemSeed =>  
    showAnsHashInfo =>  1
    showCorrectAnswers  =>  Show Correct Answers
    showOldAnswers  =>  1
    showPGInfo  =>  1
    sourceFilePath  =>  issueSampleProblem.pg
    startTime   =>  1726331176
    user    =>  Peter.Lert

    Environment variables

    AnswerDateAMPM  =>  pm
    AnswerDateDay   =>  14
    AnswerDateDayOfWeek =>  Saturday
    AnswerDateDayOfWeekAbbrev   =>  Sat
    AnswerDateHour12    =>  12
    AnswerDateHour24    =>  12
    AnswerDateMinute    =>  56
    AnswerDateMonthAbbrev   =>  Sep
    AnswerDateMonthNumber   =>  09
    AnswerDateMonthWord =>  September
    AnswerDateTime12    =>  12:56pm
    AnswerDateTime24    =>  12:56
    AnswerDateTimeZone  =>  EDT
    AnswerDateYear2Digit    =>  24
    AnswerDateYear4Digit    =>  2024
    CAPA_GraphicsDirectory  =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/CAPA_Graphics/
    CAPA_Graphics_URL   =>  /webwork2_files/CAPA_Graphics/
    CAPA_MCTools    =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_MCTools/
    CAPA_Tools  =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_Tools/
    DueDateAMPM =>  pm
    DueDateDay  =>  14
    DueDateDayOfWeek    =>  Saturday
    DueDateDayOfWeekAbbrev  =>  Sat
    DueDateHour12   =>  12
    DueDateHour24   =>  12
    DueDateMinute   =>  56
    DueDateMonthAbbrev  =>  Sep
    DueDateMonthNumber  =>  09
    DueDateMonthWord    =>  September
    DueDateTime12   =>  12:56pm
    DueDateTime24   =>  12:56
    DueDateTimeZone =>  EDT
    DueDateYear2Digit   =>  24
    DueDateYear4Digit   =>  2024
    MathJaxURL  =>  undef
    OpenDateAMPM    =>  pm
    OpenDateDay =>  14
    OpenDateDayOfWeek   =>  Saturday
    OpenDateDayOfWeekAbbrev =>  Sat
    OpenDateHour12  =>  12
    OpenDateHour24  =>  12
    OpenDateMinute  =>  56
    OpenDateMonthAbbrev =>  Sep
    OpenDateMonthNumber =>  09
    OpenDateMonthWord   =>  September
    OpenDateTime12  =>  12:56pm
    OpenDateTime24  =>  12:56
    OpenDateTimeZone    =>  EDT
    OpenDateYear2Digit  =>  24
    OpenDateYear4Digit  =>  2024
    PERSISTENCE_HASH    =>  
    PERSISTENCE_HASH_UPDATED    =>  
    PRINT_FILE_NAMES_FOR    =>  [ admin, support, professor ]
    PRINT_FILE_NAMES_PERMISSION_LEVEL   =>  10
    PROBLEM_GRADER_TO_USE   =>  avg_problem_grader
    QUIZ_PREFIX =>  
    Rserve  =>  
    host    =>  vm95.math.umb.edu
    __files__   =>  
    (eval 4510) =>  issueSampleProblem.pg
    (eval 4685) =>  /opt/webwork/pg/macros/core/PGstandard.pl
    (eval 4686) =>  /opt/webwork/pg/macros/core/PGbasicmacros.pl
    (eval 4693) =>  /opt/webwork/pg/macros/core/PGanswermacros.pl
    (eval 4694) =>  /opt/webwork/pg/macros/math/PGnumericevaluators.pl
    (eval 4702) =>  /opt/webwork/pg/macros/answers/PGfunctionevaluators.pl
    (eval 4714) =>  /opt/webwork/pg/macros/answers/PGstringevaluators.pl
    (eval 4715) =>  /opt/webwork/pg/macros/answers/PGmiscevaluators.pl
    (eval 4721) =>  /opt/webwork/pg/macros/core/PGauxiliaryFunctions.pl
    (eval 4722) =>  /opt/webwork/pg/macros/core/PGcommonFunctions.pl
    (eval 4723) =>  /opt/webwork/pg/macros/math/customizeLaTeX.pl
    (eval 4724) =>  /opt/webwork/pg/macros/core/PGML.pl
    (eval 4726) =>  /opt/webwork/pg/macros/core/MathObjects.pl
    (eval 4727) =>  /opt/webwork/pg/macros/core/Parser.pl
    (eval 4728) =>  /opt/webwork/pg/macros/core/Value.pl
    (eval 4730) =>  /opt/webwork/pg/macros/parsers/parserCustomization.pl
    (eval 4731) =>  /opt/webwork/pg/macros/ui/niceTables.pl
    (eval 4734) =>  /opt/webwork/pg/macros/contexts/contextTypeset.pl
    (eval 4736) =>  /opt/webwork/pg/macros/parsers/parserQuotedString.pl
    (eval 4737) =>  /opt/webwork/pg/macros/PGcourse.pl
    pg  =>  /opt/webwork/pg
    root    =>  /opt/webwork/webwork2
    tmpl    =>  /opt/webwork/courses/testXX/templates
    ansEvalDefaults =>  
    answersOpenAfterDueDate =>  2880
    assignOpenPriorToDue    =>  14400
    enableReducedScoring    =>  0
    functRelPercentTolDefault   =>  0.5
    numAbsTolDefault    =>  0.02
    numRelPercentTolDefault =>  1
    reducedScoringPeriod    =>  2880
    reducedScoringValue =>  0.85
    answerDate  =>  1726332977
    answerPrefix    =>  
    answersAvailable    =>  
    answersOpenAfterDueDate =>  2880
    assignOpenPriorToDue    =>  14400
    convertFullWidthCharacters  =>  0
    courseName  =>  testXX
    debuggingOptions    =>  
    show_answer_group_info  =>  1
    show_answer_hash_info   =>  1
    show_pg_info    =>  1
    show_resource_info  =>  1
    view_problem_debugging_info =>  1
    defaultDisplayMatrixStyle   =>  [s]
    displayMode =>  HTML_MathJax
    dueDate =>  1726332977
    effectivePermissionLevel    =>  20
    enableReducedScoring    =>  0
    entryAssist =>  MathQuill
    external_data   =>  
    feedback_button_name    =>  Email Instructor
    forceScaffoldsOpen  =>  1
    forceShowAttemptResults =>  1
    formattedAnswerDate =>  September 14, 2024, 12:56:17 PM EDT
    formattedDueDate    =>  September 14, 2024, 12:56:17 PM EDT
    formattedOpenDate   =>  September 14, 2024, 12:56:17 PM EDT
    formattedReducedScoringDate =>  December 31, 1969, 7:00:00 PM EST
    functAbsTolDefault  =>  0.001
    functLLimitDefault  =>  0.0000001
    functMaxConstantOfIntegration   =>  1E8
    functNumOfPoints    =>  3
    functRelPercentTolDefault   =>  0.5
    functULimitDefault  =>  0.9999999
    functVarDefault =>  x
    functZeroLevelDefault   =>  1E-14
    functZeroLevelTolDefault    =>  1E-12
    grader  =>  avg_problem_grader
    htmlDirectory   =>  /opt/webwork/courses/testXX/html/
    htmlPath    =>  [ ., /opt/webwork/courses/testXX/html, /opt/webwork/webwork2/htdocs ]
    htmlURL =>  /webwork2_course_files/testXX/
    imagegen    =>  undef
    imagesPath  =>  [ ., /opt/webwork/courses/testXX/html/images, /opt/webwork/webwork2/htdocs/images ]
    inputs_ref  =>  
    AnSwEr0001  =>  
    MaThQuIlL_AnSwEr0001    =>  
    displayMode =>  
    effectiveUser   =>  Peter.Lert
    key =>  NEgRZwEbPDc5AZeudU3P17xiT39PPYno
    num_attempts    =>  2000
    passwd  =>  
    previous_AnSwEr0001 =>  
    problemSeed =>  
    showAnsHashInfo =>  1
    showCorrectAnswers  =>  Show Correct Answers
    showOldAnswers  =>  1
    showPGInfo  =>  1
    sourceFilePath  =>  issueSampleProblem.pg
    startTime   =>  1726331176
    user    =>  Peter.Lert
    isInstructor    =>  1
    language    =>  en
    language_subroutine =>  CODE
    latexImageConvertOptions    =>  
    input   =>  
    density =>  300
    output  =>  
    quality =>  100
    latexImageSVGMethod =>  dvisvgm
    localHelpURL    =>  /pg_files/helpFiles/
    macrosPath  =>  [ ., /opt/webwork/courses/testXX/templates/macros, /opt/webwork/pg/macros, /opt/webwork/pg/macros/answers, /opt/webwork/pg/macros/capa, /opt/webwork/pg/macros/contexts, /opt/webwork/pg/macros/core, /opt/webwork/pg/macros/graph, /opt/webwork/pg/macros/math, /opt/webwork/pg/macros/misc, /opt/webwork/pg/macros/parsers, /opt/webwork/pg/macros/ui, /opt/webwork/pg/macros/deprecated, /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_Tools, /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_MCTools, /opt/webwork/libraries/UMass-Boston/macros ]
    mathViewLocale  =>  mv_locale_us.js
    needs_grading   =>  
    numAbsTolDefault    =>  0.02
    numFormatDefault    =>  
    numOfAttempts   =>  2000
    numRelPercentTolDefault =>  1
    numZeroLevelDefault =>  1E-14
    numZeroLevelTolDefault  =>  1E-12
    num_of_correct_ans  =>  1000
    num_of_incorrect_ans    =>  1000
    onTheFlyImageSize   =>  400
    openDate    =>  1726332977
    parseAlternatives   =>  0
    pastDue =>  
    permissionLevel =>  20
    pgMacrosDir =>  /opt/webwork/pg/macros
    probFileName    =>  issueSampleProblem.pg
    probNum =>  1
    problemPostamble    =>  
    HTML    =>  
    TeX =>  
    problemPreamble =>  
    HTML    =>  
    TeX =>  
    problemSeed =>  123456
    problemUUID =>  Peter.Lert-testXX-setUndefined_Set-prob1
    problemValue    =>  
    processAnswers  =>  1
    psvn    =>  123
    questionNumber  =>  1
    r_source    =>  undef
    recitationName  =>  
    recitationNumber    =>  
    recorded_score  =>  0
    reducedScoringDate  =>  undef
    reducedScoringPeriod    =>  2880
    reducedScoringValue =>  0.85
    refreshMath2img =>  1
    sectionName =>  
    sectionNumber   =>  
    server_root_url =>  https://xxx.xxx.xxx.xxx
    setDescription  =>  undef
    setNumber   =>  Undefined_Set
    setOpen =>  
    showAttemptAnswers  =>  0
    showAttemptPreviews =>  
    showAttemptResults  =>  1
    showCorrectAnswers  =>  2
    showFeedback    =>  1
    showHints   =>  1
    showMessages    =>  
    showSolutions   =>  1
    show_answer_group_info  =>  1
    show_answer_hash_info   =>  1
    show_pg_info    =>  1
    show_resource_info  =>  1
    sourceFilePath  =>  issueSampleProblem.pg
    specialPGEnvironmentVars    =>  
    CAPA_GraphicsDirectory  =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/CAPA_Graphics/
    CAPA_Graphics_URL   =>  /webwork2_files/CAPA_Graphics/
    CAPA_MCTools    =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_MCTools/
    CAPA_Tools  =>  /opt/webwork/courses/testXX/templates/Contrib/CAPA/macros/CAPA_Tools/
    PRINT_FILE_NAMES_FOR    =>  [ admin, support, professor ]
    PRINT_FILE_NAMES_PERMISSION_LEVEL   =>  10
    Rserve  =>  
    host    =>  xxx.xxx.xxx.xxx
    convertFullWidthCharacters  =>  0
    entryAssist =>  MathQuill
    latexImageConvertOptions    =>  
    input   =>  
    density =>  too deep
    output  =>  
    quality =>  too deep
    latexImageSVGMethod =>  dvisvgm
    onTheFlyImageSize   =>  400
    parseAlternatives   =>  0
    problemPostamble    =>  
    HTML    =>  
    TeX =>  
    problemPreamble =>  
    HTML    =>  
    TeX =>  
    useOldAnswerMacros  =>  1
    use_javascript_for_live3d   =>  1
    waiveExplanations   =>  0
    studentID   =>  
    studentLogin    =>  Peter.Lert
    studentName =>  Peter Lert
    tempDirectory   =>  /opt/webwork/webwork2/htdocs/tmp/testXX/
    tempURL =>  /webwork2_files/tmp/testXX/
    templateDirectory   =>  /opt/webwork/courses/testXX/templates/
    useBaseTenLog   =>  0
    useMathQuill    =>  1
    useMathView =>  
    useOldAnswerMacros  =>  1
    use_javascript_for_live3d   =>  1
    use_opaque_prefix   =>  0
    use_site_prefix =>  
    view_problem_debugging_info =>  1
    waiveExplanations   =>  0
    webworkDocsURL  =>  https://webwork.maa.org/

    Context flags

    allowBadFunctionInputs  =>  0
    allowBadOperands    =>  0
    allowEmptyStrings   =>  1
    allowMissingFunctionInputs  =>  0
    allowMissingOperands    =>  0
    allowWrongArgCount  =>  0
    checkUndefinedPoints    =>  0
    convertFullWidthCharacters  =>  0
    formatStudentAnswer =>  evaluated
    granularity =>  1000
    ignoreEndpointTypes =>  0
    ijk =>  0
    ijkAnyDimension =>  1
    infiniteWord    =>  infinity
    limits  =>  [ -2, 2 ]
    max_adapt   =>  1E8
    max_undefined   =>  undef
    num_points  =>  5
    parseAlternatives   =>  0
    reduceConstantFunctions =>  1
    reduceConstants =>  1
    reduceSets  =>  1
    reduceSetsForComparison =>  1
    reduceUnions    =>  1
    reduceUnionsForComparison   =>  1
    resolution  =>  undef
    showExtraParens =>  1
    tolExtraDigits  =>  1
    tolTruncation   =>  1
    tolType =>  relative
    tolerance   =>  0.01
    useBaseTenLog   =>  0
    useFuzzyReals   =>  1
    useMathQuill    =>  1
    zeroLevel   =>  1E-14
    zeroLevelTol    =>  1E-12

    new AnSwEr0001: AnswerEvaluator=HASH(0x55d09fcd6418) -- ans:
    AnswerHash
    _filter_name    =>  dereference_array_ans
    ans_label   =>  AnSwEr0001
    ans_message =>  
    correct_ans =>  3.14159
    correct_ans_latex_string    =>  3.14159
    correct_value   => context  => ...
                       data    =>  [ 3.14159265358979 ]
                       equation => ...
    done    =>  1
    error_flag  =>  undef
    error_message   =>  
    ignoreInfinity  =>  1
    ignoreStrings   =>  1
    original_student_ans    =>  
    preview_latex_string    =>  undef
    preview_text_string =>  undef
    score   =>  0
    showEqualErrors =>  1
    showTypeWarnings    =>  1
    showUnionReduceWarnings =>  1
    student_ans =>  
    studentsMustReduceUnions    =>  1
    type    =>  Value (Real)

Thanks again to everyone for help.

In reply to Peter Lert

Re: Upgrade to 2.19: displaying tables and correct answers

by Glenn Rice -

It looks like you might have missed a step in the upgrade/installation.  Based on your screenshot, the javascript and css is not loading properly.  So run "npm ci" in both of the /opt/webwork/webwork2/htdocs and /opt/webwork/pg/htdocs directories.  Then restart the webwork2 app with "sudo systemctl restart webwork2".  If that doesn't fix the issue, then we will need more information.

In reply to Glenn Rice

Re: Upgrade to 2.19: displaying tables and correct answers

by Thomas Mullaly -

I did those commands, I didn't do the "miscellaneous systems patches" that came after that:

If the users of your system will be using problems that utilize the PGtikz.pl or PGlateximage.pl macro (or the underlying LaTeXImage.pm module), and you have set $pg{specialPGEnvironmentVars}{latexImageSVGMethod} = 'dvisvgm' in localOverrides.conf then you will need to apply the following patch:

$ sudo patch -p1 -d / < /opt/webwork/webwork2/docker-config/pgfsys-dvisvmg-bbox-fix.patch
Could this be the issue?
In reply to Thomas Mullaly

Re: Upgrade to 2.19: displaying tables and correct answers

by Danny Glin -
Check your browser's error console.  It's usually accessed through developer tools, though this varies between browsers.  If Glenn's diagnosis is correct then you will see error messages about not being able to load some js or css files.

If you did run the `npm ci` command in both /opt/webwork/webwork2/htdocs and /opt/webwork/pg/htdocs then it's possible that the permissions are such that the web server can not access those files.  In this case you would see "forbidden" errors in your browser's error console.  If that is the case then you will need to make those folders readable by the web server.
In reply to Thomas Mullaly

Re: Upgrade to 2.19: displaying tables and correct answers

by Glenn Rice -

The pgfsys dvisvgm patch will not affect most problems.  Certainly not this one.

This definitely an issue with javascript and css.  Check the console as Danny suggests.  There are also other possibilities as to why the javascript and css are not loading that we might need to look for that we haven't suggested yet.

In reply to Glenn Rice

Re: Upgrade to 2.19: displaying tables and correct answers

by Peter Lert -
Thanks Glenn and Danny. I'm finally able to get back to this issue. You thought there were a couple things to check after running the npm ci commands and restarting the system (which we did). I followed your knd suggestion to start with browser results.
(FYI, we also have warnings whenever an instructor uses the Course Configuration tool. The warnings are like:
Use of uninitialized value $default in numeric eq (==) at /opt/webwork/webwork2/lib/WeBWorK/ConfigObject/boolean.pm line 39.
usually repeated. I want to mention it in case it's related) 
Back to the main story. Suggestions will be greatly appreciated.

When I load the same sample problem I started the thread with in the Problem Editor, with the Developer Tools console visible in Chrome, I indeed get a bunch of error 404 messages:
GET https://webwork219.math.umb.edu/pg_files/js/Problem/problem.ba2d1495.min.css net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Knowls/knowl.4c1a9011.min.css net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/ImageView/imageview.a928ea73.min.css net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/MathQuill/mqeditor.ad211705.min.css net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/node_modules/mathquill/dist/mathquill.css?version=github:openwebwork/mathquill@WeBWorK-2.19 net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Feedback/feedback.6472e266.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Base64/Base64.40f8ebee.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Knowls/knowl.a585a7a0.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/ImageView/imageview.29b8afd5.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Problem/details-accordion.349202cd.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/Essay/essay.f2167a92.min.js net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/node_modules/mathquill/dist/mathquill.js?version=github:openwebwork/mathquill@WeBWorK-2.19 net::ERR_ABORTED 404 (Not Found)
GET https://webwork219.math.umb.edu/pg_files/js/MathQuill/mqeditor.8ad94a78.min.js net::ERR_ABORTED 404 (Not Found)
Entries in our site.conf include:
$webwork_url       = '/webwork2';
$server_root_url   = 'https://webwork219.math.umb.edu';
$webwork_htdocs_url  = "/webwork2_files";
$webwork_htdocs_dir  = "$webwork_dir/htdocs";
$pg_htdocs_url = "/pg_files";
$webwork_courses_url = "/webwork2_course_files";
$webwork_courses_dir = "/opt/webwork/courses"; # a typical place to put course directories

Using a version of the ls command, it seems that all the files are actually there, and the permissions seem okay:

ll /opt/webwork/pg
.
.(in part)
.
drwxrwxr-x  2 www-data wwadmin  4096 Aug  7 18:14 conf/
drwxrwxr-x  5 www-data www-data 4096 Aug  7 18:19 htdocs/
drwxrwxr-x  5 www-data wwadmin  4096 Aug  7 18:14 lib/
.
ll  /opt/webwork/pg/conf
-rw-rw-r--  1 www-data wwadmin 8241 Aug  7 18:14 pg_config.dist.yml
ll /opt/webwork/pg/htdocs
-rwxrwxr-x   1 www-data www-data  7374 Aug  7 18:14 generate-assets.js*
drwxrwxr-x   2 www-data www-data  4096 Aug  7 18:14 helpFiles/
drwxrwxr-x  19 www-data www-data  4096 Aug  7 18:14 js/
drwxrwxr-x 129 www-data www-data  4096 Sep 28 23:52 node_modules/
-rw-rw-r--   1 www-data www-data  1500 Aug  7 18:14 package.json
-rw-rw-r--   1 www-data www-data 99844 Aug  7 18:14 package-lock.json
-rw-rw-r--   1 www-data www-data  3042 Sep 28 23:52 static-assets.json
ll /opt/webwork/pg/htdocs/js
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 AppletSupport/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Base64/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 DragNDrop/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Essay/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Feedback/
drwxrwxr-x  3 www-data www-data 4096 Sep 28 23:52 GraphTool/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 ImageView/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Knowls/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 LiveGraphics/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 MathQuill/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 MathView/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Problem/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 QuickMatrixEntry/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 RadioButtons/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 RadioMultiAnswer/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 Scaffold/
drwxrwxr-x  2 www-data www-data 4096 Sep 28 23:52 UnionTables/
ll /opt/webwork/pg/htdocs/node_modules
.
.(in part)
.
drwxrwxr-x   3 www-data www-data  4096 Sep 28 23:52  mathquill/
drwxrwxr-x   5 www-data www-data  4096 Sep 28 23:52  mdn-data/
drwxrwxr-x   6 www-data www-data  4096 Sep 28 23:52  nanoid/
drwxrwxr-x   3 www-data www-data  4096 Sep 28 23:52  node-releases/
.
ll /opt/webwork/pg/htdocs/js/Knowls
-rw-rw-r--  1 www-data www-data  454 Sep 28 23:52 knowl.4c1a9011.min.css
-rw-rw-r--  1 www-data www-data 2701 Sep 28 23:52 knowl.a585a7a0.min.js
-rw-rw-r--  1 www-data www-data 4701 Aug  7 18:14 knowl.js
-rw-rw-r--  1 www-data www-data  454 Sep 28 23:52 knowl.rtl.4c1a9011.min.css
-rw-rw-r--  1 www-data www-data  722 Aug  7 18:14 knowl.scss










In reply to Peter Lert

Re: Upgrade to 2.19: displaying tables and correct answers

by Glenn Rice -
The warning about the uninitialized value $default is most likely because you have some boolean variable in the course environment (either in site.conf or localOverrides.conf) that is not set as it should be. Since none of the boolean variables are used for the url resolution, that is probably unrelated to this issue.

What do you have set for the pg_dir in conf/webwork2.mojolicious.yml? I noticed that all of the files that aren't loading are in the the pg htdocs location. I also noticed that if you change pg_files to webwork2_files in the URLs that you posted, then the files load.

How are you serving webwork2? Are you serving via hypnotoad directly, or are you proxying in some way? If you are proxying, then you may need to check your proxy configuration. If you are using apache2, then check the file conf/webwork2.apache2.4.conf to see that the pg_files location is configured correctly. If you are using some other proxy (or a load balancer), then you will need to check that the pg_files location is configured correctly.
In reply to Glenn Rice

Re: Upgrade to 2.19: displaying tables and correct answers

by Danny Glin -

When I visit a URL on your server ending in pg_files I get an error page from nginx, which makes me believe that the nginx server is not properly proxying those URLs.  Based on this checking your proxy configuration would be a good place to start.

In reply to Danny Glin

Re: Upgrade to 2.19: displaying tables and correct answers

by Peter Lert -
Hi Danny and Glenn,
Once again your clues pointed the way, and my colleague Tom was able to track down the issue and fix it. Indeed the nginx configuration was not correct and proxying was failing. All seems well now with the various display functions: tables, correct answers, check answers, help buttons.
It took us a while to sort it out - thanks again for all your support to us and the whole community!
--Peter