CGExtensions cge_country_options fails

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

CGExtensions cge_country_options fails

Post by rotezecke »

I updated CGExtensions today to 1.55.6. the country options now fail:

Code: Select all

{$og_country = "AU"}
{if $isRPC && !empty($smarty.post)}
 {$og_country = $smarty.post.og_country}
{/if}
{$countryOptions  = "{cge_country_options selected=$og_country}"}
...
results in a warning
Invalid argument supplied for foreach() in /home/rpccomau/public_html/modules/CGExtensions/lib/class.smarty_plugins.php on line 146
1) did anyone else experience that problem

i rolled back (file system only - fixed my problem), changed the version number in 'modules' table with phpmyadmin (to 1.55.5). i can't see any database changes on first glance. however, CMSMS knows that I'm trying to trick it, the module manager reports:
1.55.6 Installed
Cannot Uninstall
Database Version Newer
so the system information shows 1.55.5, the module manager 1.55.6
2) which tables do i need to edit / restore to roll back properly?

Thank you.

----------------------------------------------

Cms Version: 2.2.1

Installed Modules:

AdminSearch: 1.0.3
CGBlog: 1.14.4
CGExtensions: 1.55.5
CGSimpleSmarty: 2.1.6
CGSmartImage: 1.21.9
CMSContentManager: 1.1.5
CMSMailer: 6.2.14
Captcha: 0.5.5
CmsJobManager: 0.1
DesignManager: 1.1.2
FileManager: 1.6.3
FilePicker: 1.0.alpha
FormBuilder: 0.8.1.6
JQueryTools: 1.4.0.3
MicroTiny: 2.1.1
ModuleManager: 2.1
Navigator: 1.0.6
News: 2.51.1
Search: 1.51.1


Config Information:

php_memory_limit:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Brisbane
permissive_smarty: false


Php Information:

phpversion: 7.0.20
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 30711
E_STRICT: 0
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 256M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 16M
upload_max_filesize: 16M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 2.6.32-673.26.1.lve1.4.29.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.0.31
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /home/x/public_html/tmp (0755)
tmp_cache: /home/x/public_html/tmp/cache (0755)
templates_c: /home/x/public_html/tmp/templates_c (0755)
modules: /home/x/public_html/modules (0755)
uploads: /home/x/public_html/uploads (0755)
File Creation Mask (umask): /home/x/public_html/tmp/cache (0755)
config_file: 0444

----------------------------------------------
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: CGExtensions cge_country_options fails

Post by Rolf »

Try to delete the moduleinfo file in the module folder.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: CGExtensions cge_country_options fails

Post by rotezecke »

Still showing 1.55.6 in module manager. that moduleinfo.ini file shows 1.55.5 as expected.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: CGExtensions cge_country_options fails

Post by rotezecke »

I have a feeling this should be a bug report, could someone please weigh in.

I replaced the function smarty_function_cge_country_options in lib/class.smarty_plugins.php with the one from the previous release and that works. The difference is a new protected function get_country_list() that is supposed to return the results of the sql but it's empty. so I went rogue for a bit till i realised this function is not called. I temporarily changed get_country_list() function from protected to public, and I now get the country list (note: this is not a solution).

this lead to another problem, as the default selected country was no longer selected. in the new cge_country_options that approach has changed, too

Code: Select all

if( in_array($row['code'],$selected) )
$selected is not defined at this point and $params['selected'] is not being checked.
Last edited by rotezecke on Tue Jul 11, 2017 2:15 pm, edited 1 time in total.
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: CGExtensions cge_country_options fails

Post by rotezecke »

BTW, the Version mismatch was resolved by manually clearing tmp/cache. In my case there were about 10 files that stayed behind even after clearing cache. i don't know if this is by design.
Locked

Return to “Modules/Add-Ons”