When attempting to view a README file, the following error message is displayed: "The website encountered an unexpected error. Please try again later." I've attached a patch which fixes this issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bribread22 created an issue. See original summary.

bribread22’s picture

Assigned: bribread22 » Unassigned
bribread22’s picture

FileSize
1.61 KB
bribread22’s picture

Issue summary: View changes
bribread22’s picture

Status: Active » Needs review
amit.drupal’s picture

When install drupal without composer "The website encountered an unexpected error. Please try again later." issues are display when use any module. for install drupal 8.x.x version install composer.
issues test on different version but issues are not display.

Use Drupal 8.1.x ,8.2.x and 8.3.x version and Advanced help(8.x-1.x-dev).
but enable to generate issues .
README file are open properly attach screanshot(advance-help-readme.png).

amit.drupal’s picture

Status: Needs review » Needs work
FileSize
89.06 KB
bribread22’s picture

Hi @amit.drupal, I find that interesting that Drupal with composer makes a difference. Do you know why this is (ex. missing a dependency)?

I forgot to mention that when I look at the recent log messages after generating this error, I get the following message before I applied my patch on my local codebase:
Error: Cannot use string offset as an array in Drupal\advanced_help\Controller\AdvancedHelpController->topicPage() (line 256 of modules\contrib\advanced_help\src\Controller\AdvancedHelpController.php).

I suspect that it may have something to do with line 252 in that file.

metzlerd’s picture

Status: Needs work » Needs review
Related issues: +#2811327: Improve Dependency management and/or documentation
FileSize
612 bytes

I was able to reproduce some of this problem. Although since we don't have the exact errors, I suspect the error is related to the way the project declares dependencies related to the markdown processor. I've created a separate issue regarding this at [#248489].

There is definitely a bug in ViewTopic though as there is once case where it returns string data instead of a build array, so I've attached a simple patch to fix that bug, which may have something to do with the initial error experienced here.

metzlerd’s picture

woops... wrong project window... deleting.

gnuget’s picture

Thanks for your patches!

#3 had an issue (it make the README page look ok but the rest were broken) and #9 worked fine!

Also for #6 and #8 feel free to create a different issue.

I added a couple lines to fix a related problem.

Thanks!

  • gnuget committed 0db50ce on 8.x-1.x authored by metzlerd
    Issue #2804625 by bribread22, metzlerd, gnuget: Unable to view README...
gnuget’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.