We are using a modified version of ext.edit_tab_ajax. It worked perfectly in EE 1.6.0, but we realized that it has a problem in 1.6.3: If you choose to display more than 50 entries, it displays no results.
We had this problem with our modified extension and with the original one. We tried it in two different EE installs, with the same results.
We tried this with EE 1.6.1 and EE 1.6.3 build 20080421, and ext.edit_ajax_tab 1.2.1.
My developer found the problem and corrected it in our modified version of the extension. This is his report:
File: extensions/ext.edit_tab_ajax.php Method: Edit_tab_ajax::process_search() Line: 227 Problem:
Regular expression “|<form[^>]+>(.*?)</form>|is” does not match the content of the second form element in $edit_forms (entries) when variable exp_perpage (cookie) is greater than 100. Only the first form in $edit_forms matches.
Also, we had several problems when searching special characters (our site is in Spanish). We found out that the javascript in the extension uses the escape function to escape the submitted data, but that function doesn’t play well with special characters. My developer suggests using encodeURIComponent instead. We changed it in our version and it works fine now.
Hey Nelly, thanks for reporting, and with such detail. Are you using any other control panel extensions? I’m not experiencing this behavior, and I’m not seeing how the exp_perpage cookie is coming into play here.
The comment regarding escape vs. encodeURIComponent is absolutely correct and I’ll make sure that gets changed. I’ll wait to add that to the release until we get to the bottom of the first issue.
The exp_perpage cookie is involved because it is used to determine the last selected value for the number of results in the Edit panel. When the user chooses to display 100+ entries, the error is toggled.
We don’t believe the problem has to do with ext.live-search.
I hope this is the information you needed, thank you!
Nelly, we use that extension on our own site, and I use it on my personal site. I find no problems with setting the number of results above 50, or to any arbitrary high value, nor can I see any reason how that would cause a failure. I would suggest disabling all other extensions and see if you can still exhibit the problem, or trying on a separate, clean installation on the same server.
Les, can you try disabling all other extensions, or even making a separate temporary fresh installation of EE on this server environment, and seeing if you still experience the problem? If you do, feel free to email me the source of the HTML on the edit page when receiving this error.
Some additional info I noticed after I sent you the source code:
1. The error message isn’t in the source code - the entries are actually listed as they should be (!)
2. After causing the error to show (by selecting 75, 100 or 150 entries to display), if I then click on the ‘Edit’ tab, the required number of entries (75, 100 or 150) *will* display without an error message (clicking the ‘search’ button recreates the error message).
Les, the source you sent me indicates that you have other modifications or extensions enabled. There is Javascript after the closing HTML tag that does not belong to the Edit Tab Ajax extension. I have a feeling that you have multiple extensions using the same hook that are not playing nice with one another.
Sorry, I should have made clear: while the html source code is from my main site (which does have other extensions), I did as you suggested and set up a temporary fresh install - with the same exact result. I can email you the code from it if you wish (I’ll need to recrerate it again) but I assure you the result was exactly the same.
Ah, yes please. And if it’s not too much trouble, save the source to a file and zip and attach it, so I can also be sure that nothing’s been modified by email servers and clients.
Thanks Les, I see in the markup why this is occurring, but I’m not recreating on my fresh install, i.e. my markup does not exhibit this problem. Can you give me a step by step to reproduce this?