IMPORTANT: It turned out that this question couldn't really be answered based on the info I had provided, and it wasn't possible for me to provide enough info to make it answerable. Tom provided the best steps for debugging this type of issue in a normal situation so I'm giving it to him, but in my case the issue being that some changes to core that are not released yet, were causing problems in the way that Secure form processing worked. Turning of secure form processing until this issue is remedied was the solution that worked for me.
The Question:
I'm running the latest version of ExpressionEngine, and I'm a little stuck with a file field. Oh why oh why did I enable that? The issue I'm having is with the file modal that pops up either on adding a file in a file field or the clicking the little image icon by other fields. I can type whatever I want in the search field, or toggle the sorts, but the contents stay the same. Likewise the pagination links don't work:
I know that there are a number of files in that folder with names that begin in 121130. There seems to be no way to navigate around and find the file I want to add so I'm stuck. I'd love any of three types of advice listed in order of usefulness:
- How can I convert this file field back to a plain input field without losing the path information: {filedir_11}filename ?
- How can I debug this issue and figure out how to make it work?
- How can I manually modify the contents of this file field entry, even directly in the database to get the file I want selected even if the file modal doesn't work?
- Am I the only one having this issue?
update: I had already gone into the inspector and seen that requests were fired off to admin.php (renamed to mcp.php in my case), but I didn't exactly know what a proper query looked like. Tom's Answer contained a helpful screenshot of what a request and response looks like. I find that mine is making queries, but the request seems to maybe be getting redirected and losing the query in the process. Here are some screenshots to illustrate:
Here you see that when I click into the search window it loads two images, then when I type a 1 it fires a request from jquery.js to mcp.php which then seems to get 302 redirected twice before getting a response useless to jquery:
Here is the response for that third request (the others resulted in a 302 so obviously returned nothing) As you can see it is returning html, not json.
So now the issue becomes figuring out where those redirects are coming from. Do I need to look to Apache? I'm not immediately seeing anything there that should be causing this, but it is possible I'm missing something.
Update 2: I thought I had this thing licked. I went into my admin.php file and found where I had set a non https link to the control panel in the Multi-Site Manager settings. I know I have a redirect set in apache to redirect all non ssl requests for the control panel through to ssl, so I thought that would get rid of at least one of those redirects… Result: no change.
admin.php?D=cp&C=content_publish&M=filemanager_actions&action=directory_contents
Accept:application/json, text/javascript, */*; q=0.01
3)/mcp.php?S=0&D=cp&C=content_files
(boy I hate these comment fields) Also the url I get when I visit the File Manager in the control panel is:/mcp.php?S=0&D=cp&C=content_files
perhaps I should already have mentioned this, but my session type is set to cookies only, because of a security issue the security team at my organisation had with the way EE2 was handling sessions.