I'm struggling mightily with a file not found error for an image in my editor. On the instance settings I have an editor field which saves images correctly. When the view.php file is displayed I see:
<img src="http://192.168.1.120/moodle/pluginfile.php/53/mod_simplelesson/firstpage/1/faq.jpg" alt="" width="200" height="200" role="presentation" class="img-responsive atto_image_button_text-bottom">
However, when I use a different page (edit_page.php) and file area (declared in get_file_areas), the image is in the editor but not when I move to show the page (showpage.php). It looks like this:
<img src="http://192.168.1.120/moodle/pluginfile.php/53/mod_simplelesson/pages/1/moodle-partner-CSP-horizontal-small-trans-gray%20copy.png" alt="" width="462" height="83" role="presentation" class="img-responsive atto_image_button_text-bottom">
But there is a 404 not found error and no image is displayed. I'm using pretty much the same process in both cases (as from https://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#Simple_use). Incidentally I don't see mod/glossary/comment.php (real world example given).
What is the most likely error here and/or what is the best way to track it down?
Is there perhaps a difference in processing or callbacks for a form that extends moodleform_mod and for one that just extends moodleform?
Thanks if you can advise.