Posts: 11
Threads: 2
Joined: Oct 2023
I have installed the CE but some of the php scripts I used on GetSimple version 3.3.16 does not seem to work with the CE version. Can someone please tell me know what needs to be changed. Here is the php code that pulls data from special fields from sub pages and list them.
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,10,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->rowcolleftsubheader; ?> <?php echo $item->getExcerpt($item->rowcolleftcontents, '20'); ?>
<?php } ?>
Posts: 408
Threads: 76
Joined: Nov 2017
(2023-10-18, 20:35:24)DC88 Wrote: I have installed the CE but some of the php scripts I used on GetSimple version 3.3.16 does not seem to work with the CE version. Can someone please tell me know what needs to be changed. Here is the php code that pulls data from special fields from sub pages and list them.
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,10,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->rowcolleftsubheader; ?> <?php echo $item->getExcerpt($item->rowcolleftcontents, '20'); ?>
<?php } ?>
What kind of return error?
Posts: 11
Threads: 2
Joined: Oct 2023
2023-10-18, 22:11:26
(This post was last modified: 2023-10-18, 22:17:53 by DC88.)
(2023-10-18, 20:45:05)multicolor Wrote: (2023-10-18, 20:35:24)DC88 Wrote: I have installed the CE but some of the php scripts I used on GetSimple version 3.3.16 does not seem to work with the CE version. Can someone please tell me know what needs to be changed. Here is the php code that pulls data from special fields from sub pages and list them.
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,10,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->rowcolleftsubheader; ?> <?php echo $item->getExcerpt($item->rowcolleftcontents, '20'); ?>
<?php } ?>
What kind of return error?
With debug mode turned on, there are no error messages, just does not render the html and there is a blank block on my page.
Posts: 11
Threads: 2
Joined: Oct 2023
2023-10-19, 15:14:50
(This post was last modified: 2023-10-19, 15:47:47 by DC88.)
(2023-10-18, 22:11:26)DC88 Wrote: (2023-10-18, 20:45:05)multicolor Wrote: (2023-10-18, 20:35:24)DC88 Wrote: I have installed the CE but some of the php scripts I used on GetSimple version 3.3.16 does not seem to work with the CE version. Can someone please tell me know what needs to be changed. Here is the php code that pulls data from special fields from sub pages and list them.
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,10,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->rowcolleftsubheader; ?> <?php echo $item->getExcerpt($item->rowcolleftcontents, '20'); ?>
<?php } ?>
What kind of return error?
With debug mode turned on, there are no error messages, just does not render the html and there is a blank block on my page.
Turns out, my navigation structure was messed up and this is why the code was unable to print the contents from the sub pages. So my question now is what is the best way to upgrade to the GS CE version? What I have done is copy over the Data and Theme folders from GS 3.3.16 to the GS CE. Obviously that's not the proper way since this messed up the navigation structure (I am using i18n_navigation plugin). Any ideas how I could solve my problem. Many thanks in advance.
Posts: 324
Threads: 5
Joined: May 2012
You could apply the patch directly to your existing install ( https://getsimplecms-ce.github.io/download.html)
And then update the plugins with the latest CE plugins ( https://getsimplecms-ce-plugins.github.io/)
Of course, backup everything before, just in case. But it should work fine.
Posts: 11
Threads: 2
Joined: Oct 2023
2023-10-19, 18:28:45
(This post was last modified: 2023-10-19, 18:30:48 by DC88.)
(2023-10-19, 18:04:41)islander Wrote: You could apply the patch directly to your existing install (https://getsimplecms-ce.github.io/download.html)
And then update the plugins with the latest CE plugins (https://getsimplecms-ce-plugins.github.io/)
Of course, backup everything before, just in case. But it should work fine.
Thanks Islander. I tried all possible methods. 1. I tried a new CE install + copy data and theme folderes over. 2. Applied the patch to GS 3.3.16, then updated the plugins. Still both would mess up my navigation structure. I did notice that only nav menus that have 2 sub menus would get messed up, so for instance, menu 1 would get messed while menu 2 won't.
Menu 1
+Menu 1 sub menu
++Menu 1 sub sub menu
Menu 2
+Menu 2 sub menu
Posts: 324
Threads: 5
Joined: May 2012
Not really sure of your setup or what is happening or not happening.
You may want to try MultiMenu to see if that could be an alternative solution for your menus.
Posts: 11
Threads: 2
Joined: Oct 2023
(2023-10-19, 18:28:45)DC88 Wrote: (2023-10-19, 18:04:41)islander Wrote: You could apply the patch directly to your existing install (https://getsimplecms-ce.github.io/download.html)
And then update the plugins with the latest CE plugins (https://getsimplecms-ce-plugins.github.io/)
Of course, backup everything before, just in case. But it should work fine.
Thanks Islander. I tried all possible methods. 1. I tried a new CE install + copy data and theme folderes over. 2. Applied the patch to GS 3.3.16, then updated the plugins. Still both would mess up my navigation structure. I did notice that only nav menus that have 2 sub menus would get messed up, so for instance, menu 1 would get messed while menu 2 won't.
Menu 1
+Menu 1 sub menu
++Menu 1 sub sub menu
Menu 2
+Menu 2 sub menu
I replicated the above menu on my clean CE edition base install and everything worked fine. So, I suspect that the XML data file for my GS 3.3 install is conflicting with the CE version. Any suggestions as to which xml files (specify file location please) I should look at in my GS 3.3 data folder? Thanks
Posts: 324
Threads: 5
Joined: May 2012
You may want to try to look at:
data\other\i18n_menu_cache.xml
or try doing a file compare on the contents of "other", but not really sure.
Posts: 11
Threads: 2
Joined: Oct 2023
(2023-10-19, 19:52:56)islander Wrote: You may want to try to look at:
data\other\i18n_menu_cache.xml
or try doing a file compare on the contents of "other", but not really sure.
I trashed it, and let GS SE rebuild the xml file. Still, the menu was messed up. The funny part, under the Pages tab, the menu is all messed up, but under Navigation Structure, everything is in the correct order!
Under the Pages tab, I tried shuffling around the pages, resaving them so as to rebuild the menu, that failed too...
I really dont wan't to rebuild all the pages in GS CE, anyone, any suggestion more please!
Posts: 11
Threads: 2
Joined: Oct 2023
Menus fixed. Now I have another issue with special pages created using I18N Special Page Fields plugin. The following code does not retrieve the data saved with the latter plugin. It can retrieve data from custom fields though. Does anyone know what needs to be modified so it retrieves values of Special Page Fields?
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,99,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->specialpagefield; ?> //does not work with SPF
<?php echo $item->custom_field; ?> //works with CF
<?php } ?>
Posts: 324
Threads: 5
Joined: May 2012
Sorry, I am not familiar with with that plug. Maybe @multi will have time this weekend to look. I will ask.
How did you get your other issue sorted?
Posts: 11
Threads: 2
Joined: Oct 2023
2023-10-20, 21:28:51
(This post was last modified: 2023-10-20, 22:17:31 by DC88.)
(2023-10-20, 18:43:49)islander Wrote: Sorry, I am not familiar with with that plug. Maybe @multi will have time this weekend to look. I will ask.
How did you get your other issue sorted?
Thanks Islander, if needed I can send him the files.
I did a couple things.
1. Deleted the i18n_menu_cache.xml in /other/
2. Made sure the structure was in the correct order under ‘Edit Navigation Order’, then saved. That rebuilt the cached xml file, deleted in above step.
3. Re saved the pages where the code was not pulling the values with a different slug name.
The odd part is, if I save back the pages under item 3 with their original slug names, the code would stop working again, so I suspect that there must be an issue with how the i18n plugin CE edition interacts with variables / pages xml data that were originally created with i18n_special_field GS 3.3.16. So to test further, I created a new special page with the CE version of i18n_special_field and I was able to pull the data using the above code. So it appears that i18n CE plugins are not fully compatible with GS 3+. Any chance someone could contact vlcek?
Posts: 324
Threads: 5
Joined: May 2012
2023-10-20, 22:21:02
(This post was last modified: 2023-10-20, 22:25:08 by islander.)
You can PM him, or make a post directly to the thread of the plugin.
I know he usually takes a few days to reply.
Are you using the version from the add-ons page or the one from the CE repo?
I remember we made an update to the CE version for something similar a while back.
Posts: 11
Threads: 2
Joined: Oct 2023
2023-10-20, 22:35:31
(This post was last modified: 2023-10-20, 22:36:19 by DC88.)
(2023-10-20, 22:21:02)islander Wrote: You can PM him, or make a post directly to the thread of the plugin.
I know he usually takes a few days to reply.
Are you using the version from the add-ons page or the one from the CE repo?
I remember we made an update to the CE version for something similar a while back.
Thanks, PM'ed Martin. Got everything from here https://getsimplecms-ce.github.io/download.html
Posts: 408
Threads: 76
Joined: Nov 2017
(2023-10-20, 16:40:56)DC88 Wrote: Menus fixed. Now I have another issue with special pages created using I18N Special Page Fields plugin. The following code does not retrieve the data saved with the latter plugin. It can retrieve data from custom fields though. Does anyone know what needs to be modified so it retrieves values of Special Page Fields?
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,99,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->specialpagefield; ?> //does not work with SPF
<?php echo $item->custom_field; ?> //works with CF
<?php } ?>
send me some subdomain for test with login and password temponary. I will check this monday, and maybe we find solution. Don't Panic! We try help, how we can
Posts: 11
Threads: 2
Joined: Oct 2023
(2023-10-20, 22:49:13)multicolor Wrote: (2023-10-20, 16:40:56)DC88 Wrote: Menus fixed. Now I have another issue with special pages created using I18N Special Page Fields plugin. The following code does not retrieve the data saved with the latter plugin. It can retrieve data from custom fields though. Does anyone know what needs to be modified so it retrieves values of Special Page Fields?
<?php /* get the pages and sort them */
global $pagesArray;
$pagesSorted = subval_sort($pagesArray,'menuOrder'); // or 'title', 'menu', 'url', ...
$thisPage = return_page_slug();
$currentSlug='_parent_'.$thisPage;
global $language;
$result = return_i18n_search_results($currentSlug,null,0,99,'+menuOrder',$language);
foreach ($result['results'] as $item) { ?>
<?php echo $item->specialpagefield; ?> //does not work with SPF
<?php echo $item->custom_field; ?> //works with CF
<?php } ?>
send me some subdomain for test with login and password temponary. I will check this monday, and maybe we find solution. Don't Panic! We try help, how we can
Thanks MultiColor. I will have to send you the complete folder as my production server is running php7.2 and I’m running the CE version locally on xamp. I will upload on wetransfer and PM you the download link. Thanks
Posts: 1,922
Threads: 87
Joined: Apr 2010
I see that you love bootstrap. Can you make a plugin to use it with the I18N gallery?
|