“Error, we cannot find the file” & Suggestions
-
Three items – An error encountered, suggested action when an error is encountered, suggested execution role switch
Error Encountered
I am experience this error message when using the front end loader with the shortcode [import-users-from-csv-with-meta role=”subscriber”]. The import appears to work correctly.Suggestion – Action When Error Encountered
It appears that wp_die is used whenever an error is encountered. While this stops futher execution, it leaves the display in a state that appears to break the theme with a white background, offset page image and fonts mapped differently.Rather than executing wp_die when an error is encountered, would it be possible to have an error handling subroutine that returns to the original calling page and displays the error there? This would be much less disruptive to the users
Suggestion – Include Option for Required Role to Execute Front End
It would be good to limit the ability for the front end shortcode to be executed only by users having sufficient permissions. I have done this by embedding your shortcode in another shortcode that checks the users permissions and only displays the file chooser and import button if sufficient permissions exist for that user. It might be helpful to include a switch in the front end shortcode to restrict execution unless the user had permission. Something like [import-users-from-csv-with-meta role=”subscriber” permission=”Editor”]
- The topic ‘“Error, we cannot find the file” & Suggestions’ is closed to new replies.