Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes if external link for mod URL is invalid #145

Open
tuanngocnguyen opened this issue Jun 5, 2020 · 0 comments
Open

Crashes if external link for mod URL is invalid #145

tuanngocnguyen opened this issue Jun 5, 2020 · 0 comments

Comments

@tuanngocnguyen
Copy link

tuanngocnguyen commented Jun 5, 2020

Step to replicate:

  • Create a course
  • Create a URL resources (mod url) with invalid external link "hhttps://yoursite.com" (intentional double 'h' in 'hhttps' )
  • Set Display setting as 'Open'
  • Save the URL
  • Click on the mod URL
  • Confirm that it rediect to: 'https://yoursite.com/mod/url/<a></a>'

Error when running 'sudo -u www-data php admin/tool/crawler/cli/crawler.php --verbose=2'

Crawling https://<moodlesite>/mod/url/view.php?id=3878052 => https:/<moodlesite>/mod/url/<a></a>/ (404) 
Default exception handler: error/invalidpersistenterror Debug: redirect: Data submitted is invalid
Error code: invalidpersistenterror
$a contents: Data submitted is invalid
* line 528 of /lib/classes/persistent.php: core\invalid_persistent_exception thrown
* line 672 of /admin/tool/crawler/classes/robot/crawler.php: call to core\persistent->update()
* line 577 of /admin/tool/crawler/classes/robot/crawler.php: call to tool_crawler\robot\crawler->crawl()
* line 81 of /admin/tool/crawler/lib.php: call to tool_crawler\robot\crawler->process_queue()
* line 55 of /admin/tool/crawler/cli/crawler.php: call to tool_crawler_crawl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant