Posts: 149
Threads: 8
Joined: Dec 2011
2014-02-11, 02:14:53
(This post was last modified: 2014-02-11, 02:15:15 by Draxeiro.)
(2014-02-11, 01:26:49)shawn_a Wrote: yes, but for proper support you need to be running it. I have no idea what you did, need a level playing field to confirm bugs.
@Shawn:
That I understand.
What I did with regards to the hotfix was exactly follow the documented changes for the fix from GitHub (add one line and replace another).
@mvlcek:
Been swamped with work here today so couldn't have a look yet. But will do so later on and let you know what I find out.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Use the other thread please.
Posts: 149
Threads: 8
Joined: Dec 2011
(2014-02-10, 22:57:08)mvlcek Wrote: (2014-02-10, 20:47:37)Draxeiro Wrote: (2014-02-10, 20:04:05)TeeJay Wrote: Draxeiro,
that is strange. I have updated to 3.3.0 the day it was released (28th January I guess) and everything still works fine.
I have "only" 28 pages (not all of them in menu) and about 20 posts of News Manager. I have tried changing order of the menu items and I didn't notice any troubles. Maybe it comes with the high number of pages, I don't really know, just saying that it's not a bug that shows to everyone in general.
It was the exact same for me. On a smaller site there was not a problem and even on our rather big site, there wasn't a problem either. That is, until I added a good number of extra project pages bringing the total to 228.
So I am guessing too that it might be related to that.
As there is no hard limit in the I18N plugin, this might be caused by one of the following:- not enough memory for PHP
- saving exceeds maximum time allowed for a request
- too many open files
Please turn on debugging and also look at the (PHP) log files.
Debugging doesn't show anything. GS error log doesn't either.
Which other log files should I check?
I did some testing (see my findings in the other thread): things stop functioning at around 149 to 171 pages. Depending on the sizes of the pages involved.
Posts: 1,204
Threads: 30
Joined: Jun 2010
Since I rarely use "load.php?id=i18n_navigation" page to change nav structure, after recently using i18n_customfields to split page name, and get a different <title> I've found out, that finding right page related to menu got a bit harder. Because i18n_navigation page relies on menu titles, adding an "edit button/icon" to the existing options on page's row would be a great addon.
Addons: blue business theme, Online Visitors, Notepad
Posts: 206
Threads: 7
Joined: Mar 2013
2014-02-13, 22:53:20
(This post was last modified: 2014-02-13, 22:53:35 by TeeJay.)
If you need to change the <title> only, I would recommend you the Custom Title plugin. It's a piece of cake to set up and you won't get more than you need.
Posts: 149
Threads: 8
Joined: Dec 2011
2014-02-16, 19:23:29
(This post was last modified: 2014-02-16, 20:01:45 by Draxeiro.)
(2014-02-10, 22:57:08)mvlcek Wrote: (2014-02-10, 20:47:37)Draxeiro Wrote: (2014-02-10, 20:04:05)TeeJay Wrote: Draxeiro,
that is strange. I have updated to 3.3.0 the day it was released (28th January I guess) and everything still works fine.
I have "only" 28 pages (not all of them in menu) and about 20 posts of News Manager. I have tried changing order of the menu items and I didn't notice any troubles. Maybe it comes with the high number of pages, I don't really know, just saying that it's not a bug that shows to everyone in general.
It was the exact same for me. On a smaller site there was not a problem and even on our rather big site, there wasn't a problem either. That is, until I added a good number of extra project pages bringing the total to 228.
So I am guessing too that it might be related to that.
As there is no hard limit in the I18N plugin, this might be caused by one of the following:- not enough memory for PHP
- saving exceeds maximum time allowed for a request
- too many open files
Please turn on debugging and also look at the (PHP) log files.
@mvlcek:
I've done some extensive testing since:
- If the site is filled with a limited amount of pages (around 30) it works fine
- If the site is filled with a large amount of pages (like 228 in our site) it doesn't work any more
- If I delete a fair number of pages save functionality of the Edit Navigation Structure page is restored again (between 149 and 171 depending on page size)
Debug console doesn't show anything. GS error log doesn't either.
I guess one of the possible causes you mentioned could be in play. Which other log files should I check for this?
Can this be host related then? As Shawn has checked it without a problem with several hundreds of pages...
Or could there be some compatibility issues with GS 3.3.1 (and 3.3.0 before it) after all?
It would be great if this can be fixed in any way. Being able to change the navigation structure does come in handy on a regular basis.
By the way, next to this Rene found a problem with url changes that reared its head since GS 3.3.0, see here. For that problem Shawn came up with a patch. I guess you probably are aware of this already but I thought I'd mention it just in case.
Posts: 6,266
Threads: 181
Joined: Sep 2011
@mvlcek
Found the issue, new versions of php have a default max limit of post items.
http://php.net/manual/en/info.configurat...input-vars
As well as susohin
Code: php_value max_input_vars 1000
php_value suhosin.get.max_vars 1000
php_value suhosin.post.max_vars 1000
php_value suhosin.request.max_vars 1000
You are sending 6 fields per menu item leaving a max of 166 items in menu.
You can probably convert these to post arrays for each item to increase this, or serialize of course.
ref .
http://stackoverflow.com/questions/10303...input-vars
Posts: 149
Threads: 8
Joined: Dec 2011
2014-02-23, 17:11:16
(This post was last modified: 2014-02-23, 19:26:41 by Draxeiro.)
In the meantime I have found a way around it by extending the max var limit setting on the server level (many thanks to Shawn for all the legwork in first finding the cause of the issue and then steering me towards the solution).
By the looks of it, it basically depends on the sever API used (which you can find out with a PHP info file, it will be the 4th entry in the list) if you can solve it by adding the code in a htacess file (in most cases by the looks of it) or by using a .user.ini file (in the case of the server using CGI/FastCGI, which was my scenario).
In the htaccess file you add:
Code: php_value max_input_vars 2000 (or whatever value you want to use)
In the case of suhosin being used you'd also add:
Code: php_value suhosin.get.max_vars 2000
php_value suhosin.post.max_vars 2000
php_value suhosin.request.max_vars 2000
That should do the trick. Be sure to check with a php info file if the values were indeed changed.
In the case of CGI/FastCGI using the htaccess route for this will result in a 500 internal server error.
Here you can solve it by pasting the following into notepad:
Code: max_input_vars 2000 (or whatever value you want to use)
And for suhosin:
Code: suhosin.get.max_vars 2000
suhosin.post.max_vars 2000
suhosin.request.max_vars 2000
save as .user.ini and upload to the root of the website
Once again be sure to check with a php info file if the values were indeed changed.
Scenario 2 worked for me (though I didn't need the suhosin bit).
However your mileage may vary as it really depends on the settings of your hosting party if they allow these scenario's (or have disabled the functionality). By the looks of it quite a few hosts will, but I've also read stories of people still hitting a brick wall.
In any case, using the solution above i18n navigation will once again save the navigation structure when using page numbers bigger than 166.
Hope this is of help to somebody
(2014-02-22, 05:58:08)shawn_a Wrote: @mvlcek
Found the issue, new versions of php have a default max limit of post items.
http://php.net/manual/en/info.configurat...input-vars
As well as susohin
Code: php_value max_input_vars 1000
php_value suhosin.get.max_vars 1000
php_value suhosin.post.max_vars 1000
php_value suhosin.request.max_vars 1000
You are sending 6 fields per menu item leaving a max of 166 items in menu.
You can probably convert these to post arrays for each item to increase this, or serialize of course.
ref .
http://stackoverflow.com/questions/10303...input-vars
Posts: 6,266
Threads: 181
Joined: Sep 2011
This plugin has conflict with 3.3.x
discussion here with workarounds
http://get-simple.info/forums/showthread...6#pid43006
Posts: 2,094
Threads: 54
Joined: Jan 2011
I18N version 3.2.6:- solves an incompatibility with GetSimple 3.3+ (page cache was not updated, thanks @shawn_a)
- includes a japanese translation (thanks to @avdwoude)
Posts: 1,921
Threads: 87
Joined: Apr 2010
I began to see that sometimes when you try to edit a page
Code: Warning: array_search() expects parameter 2 to be array, null given in B:\home\0abc.ru\www\plugins\i18n_navigation\editextras.php on line 18
[Денвер: показать возможную причину ошибки] var after = ""; function changeParent() { $parent = $('#post-parent').val(); if ($parent == null || $parent == '') { $('#post-menu-order').empty().html("
Posts: 1,921
Threads: 87
Joined: Apr 2010
site works, but I can not enter admin
Code: Warning: array_key_exists() expects parameter 2 to be array, null given in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 119
Warning: file_get_contents(B:\home\0abc.ru\www/data/pages/dopolnitelnye-stranicy.xml) [function.file-get-contents]: failed to open stream: No such file or directory in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 91
Warning: Cannot modify header information - headers already sent by (output started at B:\home\0abc.ru\www\admin\inc\caching_functions.php:119) in B:\home\0abc.ru\www\plugins\i18n_base\backend.class.php on line 7
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2014-03-03, 20:42:51)Oleg06 Wrote: I began to see that sometimes when you try to edit a page
Code: Warning: array_search() expects parameter 2 to be array, null given in B:\home\0abc.ru\www\plugins\i18n_navigation\editextras.php on line 18
[Денвер: показать возможную причину ошибки] var after = ""; function changeParent() { $parent = $('#post-parent').val(); if ($parent == null || $parent == '') { $('#post-menu-order').empty().html("
Not sure why this happens, but try to replace lines 15-19 of editextras.php with
Code: # structure
$structure = return_i18n_page_structure(null,false,$url);
$siblings = @$pages[''.$parent]['children'];
if ($siblings) $myindex = array_search($url, $siblings); else $myindex = false;
If this helps I will release a patch.
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2014-03-04, 02:32:05)Oleg06 Wrote: site works, but I can not enter admin
Code: Warning: array_key_exists() expects parameter 2 to be array, null given in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 119
Warning: file_get_contents(B:\home\0abc.ru\www/data/pages/dopolnitelnye-stranicy.xml) [function.file-get-contents]: failed to open stream: No such file or directory in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 91
Warning: Cannot modify header information - headers already sent by (output started at B:\home\0abc.ru\www\admin\inc\caching_functions.php:119) in B:\home\0abc.ru\www\plugins\i18n_base\backend.class.php on line 7
Which version of GetSimple? If it's 3.3.1, it's maybe a corrupt page cache file.
Delete data/other/pages.xml and try again.
Posts: 2,094
Threads: 54
Joined: Jan 2011
2014-03-04, 02:51:14
(This post was last modified: 2014-03-04, 02:51:35 by mvlcek.)
(2014-03-04, 02:32:05)Oleg06 Wrote: site works, but I can not enter admin
Code: Warning: array_key_exists() expects parameter 2 to be array, null given in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 119
Warning: file_get_contents(B:\home\0abc.ru\www/data/pages/dopolnitelnye-stranicy.xml) [function.file-get-contents]: failed to open stream: No such file or directory in B:\home\0abc.ru\www\admin\inc\caching_functions.php on line 91
Warning: Cannot modify header information - headers already sent by (output started at B:\home\0abc.ru\www\admin\inc\caching_functions.php:119) in B:\home\0abc.ru\www\plugins\i18n_base\backend.class.php on line 7
Maybe a corrupt page file. Try deleting data/other/pages.xml
Which version of GetSimple?
Posts: 1,921
Threads: 87
Joined: Apr 2010
GetSimple 3.3.1
deleted, does not help
Posts: 1,921
Threads: 87
Joined: Apr 2010
helped update folder admin
Posts: 1,921
Threads: 87
Joined: Apr 2010
after logging out all repeats
Posts: 1,921
Threads: 87
Joined: Apr 2010
fix it seems the problem was me, I first created the parent page, and then deleted it
Posts: 210
Threads: 15
Joined: Feb 2013
i'm using a:
PHP Code: <div class="sitemenu"> <i><ul id="mainmenu"> <?php get_i18n_navigation(return_page_slug(),0,10,I18N_FILTER_MENU, 'nawigacjaglowna'); ?> </ul></i> </div>
where the " nawigacjaglowna" is a component:
PHP Code: <li class="<?php echo $item->classes; ?>"> <a href="<?php echo htmlspecialchars($item->link); ?>" > <?php echo htmlspecialchars($item->text); ?> <?php $results2 = return_i18n_search_results('_parent_'.$item->id, null, 0, 1000, null, 'pl'); if (count($results2['results']) !=0 ){ echo '<i class="arrow"></i>'; } else { echo ''; } ?> </a>
<?php if ($item->isOpen) { ?> <ul><?php $item->outputChildren(); ?></ul> <?php } ?> </li>
this component is checking: if is any submenu (subpages) in menu add a arrow class to my menu if page have a child...
it works:
https://dl.dropboxusercontent.com/u/4998...gation.jpg
but i have a problem to use with I18N_SHOW_LANGUAGE
i want to use this methood with a I18N_FILTER_MENU but i want to have other language (only active page's in other language . how to use this two methood in one time ?
i'm was try do it like:
get_i18n_navigation(return_page_slug(),0,10,I18N_SHOW_LANGUAGE, I18N_FILTER_MENU, 'nawigacjaglowna');
not working (only I18N_SHOW_LANGUAGE is in front end.. I18N_FILTER_MENU not working)
get_i18n_navigation(return_page_slug(),0,10,I18N_SHOW_LANGUAGE | I18N_FILTER_MENU, 'nawigacjaglowna');
working.. but not giving back a level menu other than 0 level --> submenu pages is not visible (not displaying) in menu.
get_i18n_navigation(return_page_slug(),0,10,I18N_SHOW_LANGUAGE, 'nawigacjaglowna');
working.. but the submenu is visible only (drop down menu 2 and other level..) when i'm on page with one have a sub menu..
https://dl.dropboxusercontent.com/u/4998...i18n/5.jpg
mouse over the page "nowa strona" - nowa strona have subpages.. subpages is not visible in menu..
how to use this two options in one query ?
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2014-03-08, 04:21:03)xxdex Wrote: but i have a problem to use with I18N_SHOW_LANGUAGE
i want to use this methood with a I18N_FILTER_MENU but i want to have other language (only active page's in other language . how to use this two methood in one time ?
Either use one of I18N_SHOW_* constants or use a combination of the I18N_FILTER_* and I18N_OUTPUT_* constants. If you look at the top of /plugins/i18n_navigation.php, you will see that the I18N_SHOW_* constants are already combinations of the other constants.
In your case probably I18N_FILTER_LANGUAGE | I18N_FILTER_MENU is the correct parameter.
Posts: 1,921
Threads: 87
Joined: Apr 2010
This code shows the headlines even for pages with news, where the child pages in the menu options do not
Code: <?php
$bc = return_i18n_breadcrumbs(return_page_slug());
$slug = $bc[0]['url'];
$pages = return_i18n_pages();
if (@$pages[$slug]['children']) {
echo '<h3>'.$bc[0]['menu'].'</h3>';
echo '<ul class="sidemenu">';
get_i18n_navigation(return_page_slug(),1,99);
echo '</ul>';
}
?>
Posts: 210
Threads: 15
Joined: Feb 2013
thank You
Posts: 210
Threads: 15
Joined: Feb 2013
i'm trying do a onepage template.
i'm want to use a menu from "submenu" as default. i'm was input a name "menuone" to menu with one have a childrens (submenus).
i'm use a:
PHP Code: <?php global $pagesArray; $pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ... foreach ($pagesSorted as $page) if ($page['url']!='index' && $page['menuStatus']=='Y' && $page['parent']=='menuone') { $pag = $page['url']; ?>
but problem is with sorting..
subval_sort($pagesArray,'menuOrder');
is not working with i18N navigation structure..
i'm use this methood navigation structure in front-end, this is not sorting pages from I18N structure.
only when i edit a page and click "save" in front end foreach is sorting with a good order:
example:
in I18N navigation structure i have:
+ home page
+ menuone
L about us
L contact
L gallery
+ seccond menu
in front end is ok. but when i change a I18N structure to example
+ home page
+ menuone
L gallery
L about us
L contact
+ seccond menu
then in front-end is still old sorted... nothing change
there is any way to sort with foreach in front-end pages with I18N plugin ?[/code]
Posts: 3,491
Threads: 106
Joined: Mar 2010
Are you using the latest GS and I18N versions?
|