Welcome guest, please Login or Register

EEC.MS - ExpressionEngine add-ons

You are here: HomeForum Home → Others → EE1 General Discussion → Thread

   

Memory leak with MX Custom Tabs?

Rank

Total Posts: 14

Joined 2011-07-25

PM

Hello Max,

I get a blank/white CP screen when trying to access some, but not all, of my entries in a few weblogs/channels.  The error message starts with “Fatal error: Allowed memory size…” and ends with “...lib/mx_lib/simple_html_dom.php on line 195”.  The actual line number varies between attempts and entries (line 806, line 618, etc).

The sourceforge page for simple_html_dom.php shows that it has had problems with memory leaks.  The latest version (v 1.5), however, claims to fix the leaks.

Could MX Custom Tabs be altered to work with this new version of simple_html_dom.php?  Thanks for considering. 

MX Custom Tabs has been invaluable on this EE 1 site, which includes one weblog/channel with more than 70 fields.  The site has worked pretty well since launch about 1.5 years ago (your help in the old EE forums helped make that possible)

Cheers!

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

could you please try to update simple_html_dom.php? It will be more faster way to understand is it works or not . If it is not working - I will check it by myself (but I need to install EE1.x before - I don’t work with this version for more than year already).

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

Oops, forgot to mention that after updating, the custom tabs no longer function.  Clicking on a tab does not change to that tab.  Instead, nothing happens.  Javascript issue?

And after updating,  I still get a blank/white screen with some entries. The error message is the same (although line numbers are more like 1078, 1290 ish).  For example:
Fatal error: Allowed memory size of 234881024 bytes exhausted (tried to allocate 73 bytes) in /my/path/to/system/lib/mx_lib/simple_html_dom.php on line 1078

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

One more thing. 

I just realized I can’t get any error to display for the blank/white screen if I just include error_reporting and ini_set code within index.php and system/index.php.  In retrospect, I only got an error to display when I included ” error_reporting(E_ALL); ini_set(‘display_errors’, ‘1’); ” in system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php.  The NGen File Field extension seemed a likely culprit for memory issues, so I was exploring that idea.

I’m not a developer, so I’m not sure what this method of error reporting implies for simple_html_dom.php.  Moreover,  If I remove error reporting from Ngen and instead add ” error_reporting(E_ALL); ini_set(‘display_errors’, ‘1’); ” to your system/extensions/ext.mx_custom_tabs.php code, I get just a blank/white screen; no errors report.  If the error reporting code is in both, I continue to get the memory error message included in my earlier post.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

could you please try version in attachment? thanks!

     

File Attachments

Rank

Total Posts: 14

Joined 2011-07-25

PM

Wow!  That was quick.  The tabs now work with 0.7.3. (clicking a tab now switches to that tab) But unfortunately, I still get a blank/white screen when loading some entries. And the error is the same.  With error reporting turned on for Ngen File Field (as outlined in my earlier post):
Fatal error: Allowed memory size of 234881024 bytes exhausted (tried to allocate 84 bytes) in my/path/to/system/lib/mx_lib/simple_html_dom.php on line 1032

I’d like to experiment with disabling MX Custom Tabs as well as make some changes to settings for Ngen File Field. 

Can I disable MX Custom Tabs without losing my settings?  If not, can I re-enable, then manually replace the 5 db rows that are associated with mx_custom_tabs in the eec_extensions mysql table?

Thanks for your help on this.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

If not, can I re-enable, then manually replace the 5 db rows that are associated with mx_custom_tabs in the eec_extensions mysql table
yes, you can do it.

btw - do you have a lot files in Ngen upload folders ?

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

Disabling MX Custom Tabs causes the edit page to load 10 times faster. 

Ngen file is clearly a consideration, but less so than MX Custom Tabs.  Regarding ngen file, I have 10 folders of ngen files for this one weblog/channel, with 100 to 2000 files per folder.  In hindsight, I’d have used fewer folders; I didn’t realize that extra folders causes ngen to slow down.  BTW, I’ve got the latest version of ngen file.  To increase its performance, I’ve turned off thumbnails and turned off high-quality thumbnails.

Do you think it’s possible to significantly speed up MX Custom Tabs in my case?  My weblog/channel has about 65 fields, some of which are matrix, playa, and ngen fields.  I’m running a number of extensions that modify the control panel and a few others for specific functionality.

Because I have so many fields,  having the ability to create separate tab is essential.  I’m still hoping to use MX Custom Tabs.  But if MX Custom Tabs doesn’t work out, it seems there might be a few alternatives?  Devot:EE shows one called Tabify.  And Low recently tweeted that he was working on an EE 1 extension to mimic EE 2’s publish layouts.

Thanks for your speedy replies and help on this.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

regarding Tabify - it’s looks like he used the same method. So you can’t be sure that you will not have the same issue. I saw Low tweet about extensions, but by function it looks like Custom Tabs & MX Custom Field Access. But in all case if you have a big html code and ext. used show_full_control_panel_end - you can have a problem.

btw - you can try old JS version

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

Hmmm… I’ll probably just try tabify and see what happens.  If it has memory issues for my case, maybe I’ll contact Low.  Thanks for the warning about the show_full_control_panel_end hook.

I’d been contemplating migrating this site to EE 2 anyway.  This might be one more reason to do so.  Another reason is that I have a lot of matrix and playa fields, so hopefully Brandon’s later versions will be faster (i.e., matrix data and playa relationships stored in their own database tables).

Thanks again for all your help.  I just added a little donation to your coffee fund.  Cheers.

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

Oops… Tabify isn’t even close to MX Custom Tabs.  Tabify can only take a single field and put it into its own tab, labelled the same as the field.  Tabify cannot show multiple fields under one tab.

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

did you try JS version?
you don’t need change settings - just replace ext file. (than you can change it back)

p.s. Thanks for donation :) If you will have any question about EE2 upgrading - just send me a note to skype.

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

I didn’t try the old JS 0.7.0 version because I had a problem with it about 1.5 yrs ago when I set up the site.  0.7.0 was messing up my field order.  You and I had a little discussion about it in the old ExpressionEngine forums: http://expressionengine.com/archived_forums/viewthread/140277/P18/#726322

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

so, the problem with JS is only in ordering?

     
Rank

Total Posts: 14

Joined 2011-07-25

PM

ahh.. now I understand what you were suggesting. 

I just tried 0.7.0.  It’s much faster for me.  Loading the edit screen is close to the speed of disabling MX Custom Tabs (about 10 times faster)  And I see now that 0.7.0 does not use simple_html_dom.php, which was implicated in the prior error messages.

At first glance, the only issue with 0.7.0 seems to be the field order. As noted in my old EE forum posts:
“On both the publish page and the MX Custom Tabs extension settings page, the order is based on custom field ID.  But I need my tabbed publish page to accurately reflect the field order that I’ve set, which indeed varies quite a bit from the field ID order.”

Can you correct the field order without using simple_html_dom.php?

     
Avatar
RankRankRankRank

Total Posts: 701

Joined 2010-07-13

PM

yep, I believe with my current JS knowledge I can do it. But I have free time only tomorrow. But I believe you can wait for 1 day?
Could you please also check that all field work fine after moving to tabs with 0.7.0.