Jump to content


Issue information

  • #035789

  • Fixed

  • 3.3.0 Beta 1

  • 3.3.0 Beta 1

  • 0 - None Assigned


Issue Confirmations

  • Yes (1)No (0)
Photo

Hook doesn't parse language file

Posted by Adriano Faria on 09 February 2012 - 06:09 AM

3.3.0 Alpha relesead yesterday.

My construct function:

	public function __construct()
	{
		$this->registry   =  ipsRegistry::instance();
		$this->memberData =& $this->registry->member()->fetchMemberData();
		$this->settings   =& $this->registry->fetchSettings();
		$this->DB		 =  $this->registry->DB();
		$this->lang		  =  $this->registry->getClass('class_localization');
		$this->cache	  =& $this->registry->cache()->fetchCaches();
		$this->request	=& $this->registry->fetchRequest();
		
		$this->registry->class_localization->loadLanguageFile( array( 'public_topic' ), 'forums' );
	}

Example, in some part of getOutput function:

$text = $this->lang->words['my_language_bit'].' '.$times;

Template:

{$text}

or even:

{$this->lang->words['my_language_bit']} {$times}

Prints only my variable ($times); no text from language file.

changed status to: Cannot Reproduce

View PostMarcher Technologies, on 16 February 2012 - 07:06 AM, said:

it is not in the application xml files. :rofl:
it is not supposed to be of course. that's not a bug for clarity.
but how exactly can a hook perfectly install the language string, it be in the language pack and in the database, but the language string still not in the parsed array for the pack?
If we are doing something wrong, so be it, do enlighten us. :smile:


I will ask all other modders to test their hooks. Maybe someone can take us a little more seriouslly.


It seems like something like that http://community.inv...n-hook-install/

It was missing default value, OK!!! So why the hell IPS tell us that everything was installed fine when it is NOT fine!


Mark tried and couldn't reproduce, I'll try myself either today or tomorrow. Maybe a specific configuration is required to reproduce, as I recall Adriano you're using quite a new version of MySQL which had also troubles with the tables keys on installation (or have you reverted to a previous version?).


im running 3.3.0 latest on zend happily local... even nexus up and happy... but i ran into this actually during alpha on WAMP(yes, I run both off/on), but thought I was doing something wrong. :twitch:
An entire Page of a Feed Blocks Lang strings not parsing is rather disconcerting when they are present in the database. :rofl:


PHP Version 5.3.3
mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $
for reference.


View Postteraßyte, on 16 February 2012 - 12:34 PM, said:

Mark tried and couldn't reproduce, I'll try myself either today or tomorrow. Maybe a specific configuration is required to reproduce, as I recall Adriano you're using quite a new version of MySQL which had also troubles with the tables keys on installation (or have you reverted to a previous version?).

I'm using WampServer 2.2: Apache: 2.2.21 MySQL: 5.5.20 PHP: 5.3.9

The problem was ocourring because I chose ut8mb4. But now I was using utf8 on Alpha Phase I and now I'm using latin1 on Alpha Phase II.


View PostAdriano Faria, on 16 February 2012 - 02:08 PM, said:

I'm using WampServer 2.2: Apache: 2.2.21 MySQL: 5.5.20 PHP: 5.3.9The problem was ocourring because I chose ut8mb4. But now I was using utf8 on Alpha Phase I and now I'm using latin1 on Alpha Phase II.
which is exactly the specs of my WAMP instance(my zend is a smidge behind) on which both Alpha builds 1,2 and QA builds have done this on both utf8 and latin1.... I'm quite confused as to how its not rproducble, I cannot seem to NOT reproduce it.


.... I found something..... I could see why this could slip by now.
Attached File  lang_debug_cp_menu.xml   3.12K   2 downloads
This is a debug hook into the content acp menu manager skin_cp.
do  both strings print for you? i only get one of the two:
http://screencast.com/t/5oAn06qhmF
send
$this->request['debug']
as 1 to print out the whole kaboodle if needed... ccs/admin_lang IS loaded.


Looking at your hook....you're not loading any language files?  I thought the bug was that loading a language file was not adding its strings to the words array, but if you aren't even loading any language files, I would expect keys to be missing?


View Postbfarber, on 16 February 2012 - 03:45 PM, said:

Looking at your hook....you're not loading any language files?  I thought the bug was that loading a language file was not adding its strings to the words array, but if you aren't even loading any language files, I would expect keys to be missing?
...sigh that's the problem in a nutshell, they still  dont load when manually called, no matter how directly you load them, construct or not.
Attached File  lang_debug_cp_menu.xml   3.22K   4 downloads


its NOT the language PACK missing, its the string itself. :rofl:


actually install it... as i said, the language string installs... but its not actually being added to the words array at runtime for any pack, and only for packs not globally loaded. :rofl:


changed status to: Unconfirmed

I will reopen this so someone can test with the hook you have created.


changed status to: Confirmed - FAO Matt

changed status to: Fixed
changed fixed-in version to: 3.3.0 Beta 1

Fixed in next alpha build due today.

Posted Image


View PostMatt, on 17 February 2012 - 04:00 AM, said:

Fixed in next alpha build due today.Posted Image
:sorcerer: Sweet. :huggles:







1 user(s) are reading this issue

0 members, 1 guests, 0 anonymous users