Closed NZMikey closed 10 years ago
In said line, there was some new code added there specifically for bootstrap, once removing it, it worked once again. Not a fix so to speak, just a direction.
Confirmed.
This is due to a loop in the function. On line 316 of user_shortcodes.php:
return ($boot) ? "<i class='icon-user'></i>" : $this->sc_user_icon();
the sc_user_icon method is called again because no $parm value has been given. It continues to loop until memory has run out.
Will look into a fix for this
You should have in your theme: define("BOOTSTRAP", '');
No, that would require all v1 themes to have that as well (I think). All bootstrap themes should have that define in there, but not all non-bootstrap themes.
it was quick fix, something like adjust your theme for v2. If e107 is bootstrap CMS, it should be required to have main bootstrap variable defined.
Rewrite this in one line, if you want: (line 277)
if(deftrue('BOOTSTRAP'))
{
$boot = deftrue('BOOTSTRAP');
}
else
{
$boot = FALSE;
}
This works too. This test is used in 35 files, maybe only here is forgotten.
I tried (dislike this way of coding), check it, please. $boot = (deftrue('BOOTSTRAP')) ? deftrue('BOOTSTRAP') : FALSE;
Are you sure that's the problem? I think it will not change anything, The problem is that when not using a bootstrap theme, the method sc_user_icon will call sc_user_icon over and over again as no $parm is defined.
return ($boot) ? "<i class='icon-user'></i>" : $this->sc_user_icon();
It loops as it calls the same method again (and again)
I'm going to commit the fix which should make things clearer.
The commit I pushed will fix the loop. The only issue that remains is the missing user_realname.png
image.
Fixed the image as well. @NZMikey Please update the files and see if the issue is resolved for you :)
Any theme i attempt to use (Including freshly created themes from myself) that dont use bootstrap, return in a fatal error as below:
Fatal error: Out of memory (allocated 82575360) (tried to allocate 65484 bytes) in /homepages/NewSite/e107_core/shortcodes/batch/user_shortcodes.php on line 316