[fw-general] Inconsistent Error Logs

2008-11-21 Thread Matthew Ishii
(Sorry about the long winded explination.  I understand if you pass on this
one)

I am having very bizzare behavior regarding the 'error_log' files that show
up when zend framework is having issues.  I have two Zend-Framework sites,
one is the primary, which is set up under the webroot and the other is an
added-on domain and has its public web-space in a folder in the top level
doc root.  The domains are then redirected through DNS.  For example the
primary site name is www.ioforge.com and the secondary is
www.ioforge.com/evolveveganism but DNS will route that request to
www.evolveveganism.com.  Thought it *might* be important to give that
background .. probably not.

Anyway, the problem is when I access any pages on evolveveganism.com an
error log entry is created stating that a request was made for an invalid
controller named 'includes'.  In the master layout file I am generating all
of the view's headers and in them is a link to the CSS file located in the
includes directory.  Here is the code and its the same for both the domains
in question:

  headLink()->setStylesheet('
http://www.evolveveganism.com/includes/style.css', 'screen', false); ?>
  headLink() ?>

Looks good to me.  The sites are the same in all other respects, except of
course the actual paths.  So the question is then, why is an error report
created complaining about a request for an invalid controller called
includes ... when viewing evolveveganism.com pages .. but not when viewing
ioforge.com pages?

I cant think of what would possibly be different that could cause one to
have issues and the other not to have issues.  The ioforge.com site does not
have an 'includes' controller, so that is out of the question.

Anyone have any possible explanations?  Am I missing something here?


Re: [fw-general] Re: $cache->start() and caching with Zend_Translate together, possible bug?

2008-11-21 Thread kirpit
I see, when you use a $cache object for $cache->start(), it becomes
something like zend cache front object, and cannot be used for anything
else.

But I wonder is it legal to use same $cache object for any other multiple
objects (except page caching) in the same time? Like;
$cache = Zend_Cache::factory('Core', 'File');
Zend_Date::setOptions(array('cache' => $cache));
Zend_Translate::setCache($cache);

Thank you for your patience in advance.

Cheers.


21 Kasım 2008 Cuma 10:01 tarihinde kirpit <[EMAIL PROTECTED]> yazdı:

> Hey, don't you offence my friend and no need triple exclamation marks like
> that. I'm just here trying to be developer who gives feedbacks about
> possible issues. Something like payback to usage of such a nice
> architectured and totally free, open source framework. Get it?
>
> First, of course sometimes i miss the parts of documantation but i do read
> documantation starting from this example;
>
> http://framework.zend.com/manual/en/zend.translate.adapter.html#zend.translate.adapter.caching
> which is using "Page" as cache frontend.in zend_translate.
>
> And second, please don't take this as complaining but i'm just wondering
> how is it working the same $cache object for zend_date right before
> zend_translate in bootstrap;
> Zend_Date::setOptions(array('cache' => $cache));
> (I'm not that low level programmer and didn't go through the ZF codes)
>
> If you want us to dig this mailing group only for "how to"s and never show
> up for the question marks, that is fine for me.
>
> 21 Kasım 2008 Cuma 09:12 tarihinde Thomas Weidner <[EMAIL PROTECTED]>yazdı:
>
>> Please read manual about how cache frontends work !!!
>>
>> You used "Page" as Cache frontend.
>> According to manual:
>> Zend_Cache_Frontend_Page is like Zend_Cache_Frontend_Output but designed
>> for a complete page. It's impossible to use Zend_Cache_Frontend_Page for
>> caching only a single block.
>>
>> Is there any reason why you want to have also the page input within the
>> same cache data as translation ?
>>
>> Of course this can not work when other data are also added to the
>> translation cache within the same cache id.
>>
>> This is definitly a problem of a misused cache.
>>
>> Greetings
>> Thomas Weidner, I18N Team Leader, Zend Framework
>> http://www.thomasweidner.com
>>
>> - Original Message - From: "kirpit" <[EMAIL PROTECTED]>
>> To: 
>> Sent: Friday, November 21, 2008 2:05 AM
>> Subject: [fw-general] Re: $cache->start() and caching with Zend_Translate
>> together, possible bug?
>>
>>
>>  Ok, what I do, I write here step by step.
>>>
>>> I have re-downloaded ZF 1.7. I removed everything under TEMP_DIR folder.
>>> I
>>> removed every single localhost cookie.
>>>
>>> I commented $cache->start(); line and uncommented
>>> Zend_Translate::setCache($cache); line. And I have entered main page.
>>> Everything looks very fine (while not cache hitting) and I have a file
>>> zend_cache--zend_translate_full_csv_file_path filled with correct
>>> translation table, serialized under temp dir next to some small metadata
>>> files.
>>>
>>> Then I removed again cookies and everything under temp dir. I comment
>>> translate cache and uncomment $cache->start(). There is no cache hit as
>>> expected. I do have fetched output in a file named zend_cache--someMd5
>>> but i
>>> do not have any cache file about zend_translation under temp dir as
>>> expected.
>>>
>>> I only remove cookies, leaving temp dir as it is. There is cache hit as
>>> expected and response time is 19ms (wow, here i adore ZF).
>>>
>>> I check cookies (well there is none as cache hits), remove files under
>>> temp
>>> folder. I uncomment both of them. Enter the mainpage. What i have under
>>> temp
>>> dir is a file named zend_cache--zend_translate_full_csv_file_path. And
>>> guess
>>> what is inside? Fetched and serialized html output of page! :)
>>>
>>> Yes, there is no any other file bigger than 1 kb. under temp.
>>>
>>> Bug?
>>>
>>> -- Yönlendirilmiş ileti --
>>> From: "Thomas Weidner" <[EMAIL PROTECTED]>
>>> To: 
>>> Date: Thu, 20 Nov 2008 07:34:19 +0100
>>> Subject: Re: [fw-general] $cache->start() and caching with Zend_Translate
>>> together, possible bug?
>>> Sorry, but on the first look this seems to be a cache problem and not a
>>> translation one.
>>> Looking at the lines you provide I see that at line 435 the cache is
>>> loaded...
>>> $result = self::$_cache->load($id);
>>> which happens without problems.
>>>
>>> And then the cache is unserialized.
>>> unserialize($result);
>>> All translate classes are serializing the data before writing to cache so
>>> this can not be a problem.
>>>
>>> In my opinion there are only 4 things which can corrupt this behaviour.
>>>
>>> 1.) You are using an outdated cache after an update of ZF
>>> 2.) Someone writes manually to the translation cache without serializing
>>> the
>>> data
>>> 3.) Someone uses own written adapter which corrupt the cache
>>> 4.) You have a corrupted ZF version... try a update to

Re: [fw-general] generic view for Json contextSwitch

2008-11-21 Thread Daniel Latter
Couldn't you just render the same .phtml file each time using render()  
method? And maybe have a little logic  in this file also.


On Nov 22, 2008, at 1:29, Jason Webster <[EMAIL PROTECTED]> wrote:

I would recommend just disabling the views completely for JSON  
context actions.


Ralikwen wrote:

Hi,
Is it possible to use the same view for all Json context actions so  
that I
don't need to create *.json.phtml files separately for each action?  
If yes

how?

Something similar has been raised http://www.nabble.com/contextSwitch---AjaxContent-td18866597.html 
 here , but

I found no solution there either.

Thanks for the help.
SWK





Re: [fw-general] generic view for Json contextSwitch

2008-11-21 Thread Jason Webster
I would recommend just disabling the views completely for JSON context 
actions.


Ralikwen wrote:

Hi,
Is it possible to use the same view for all Json context actions so that I
don't need to create *.json.phtml files separately for each action? If yes
how?

Something similar has been raised 
http://www.nabble.com/contextSwitch---AjaxContent-td18866597.html here , but

I found no solution there either.

Thanks for the help.
SWK
  




[fw-general] Zend_Controller_Router_Route_Regex

2008-11-21 Thread Arthur M. Kang
Is there a way to use the regex route and specify that "the rest is 
key/value pairs".  Something like the * (asterisk) does in the standard 
router route.


Arthur


[fw-general] generic view for Json contextSwitch

2008-11-21 Thread Ralikwen

Hi,
Is it possible to use the same view for all Json context actions so that I
don't need to create *.json.phtml files separately for each action? If yes
how?

Something similar has been raised 
http://www.nabble.com/contextSwitch---AjaxContent-td18866597.html here , but
I found no solution there either.

Thanks for the help.
SWK
-- 
View this message in context: 
http://www.nabble.com/generic-view-for-Json-contextSwitch-tp20631627p20631627.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] strange Zend_Pdf_Exception (clone)

2008-11-21 Thread Martijn Korse

This very simple script:




require_once 'Zend/Pdf.php';

$pdf = new Zend_Pdf();
$page1 = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);


Results in the following error:


Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Cloning
Zend_Pdf_Page object using 'clone' keyword is not supported. Use 'new
Zend_Pdf_Page($srcPage)' syntax' in
/usr/local/ZendFramework/1_5_3/Zend/Pdf/Page.php:349 Stack trace: #0
/home/buur/domains/makelaardijfhbuurman.nl/public_html/wip/testpdf.php(6):
Zend_Pdf_Page->__clone() #1 {main} thrown in
/usr/local/ZendFramework/1_5_3/Zend/Pdf/Page.php on line 349

The problem is: this only happens on a production server over which i have
no control. BUT, the version of ZF running on that server is the exact same
version as i have on my localhost on which i don't have this problem. So,
i'm guessing it's a server setting.
Does anyone have any idea 

-
http://devshed.excudo.net http://devshed.excudo.net 
-- 
View this message in context: 
http://www.nabble.com/strange-Zend_Pdf_Exception-%28clone%29-tp20629716p20629716.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] problem with Zend_Dojo_Form_Element_DataTextBox / textbox undefined

2008-11-21 Thread water
I'm having a problem with Zend_Dojo_Form_Element_DataTextBox and ZF 1.7.

If I try to create a simple DateTextBox, I get an error in Firebug (textbox is 
undefined in bootstrap.js line 672).

I have tried to isolate to as simple as a form as possible like this:

337 public function dateAction(){
338 Zend_Dojo::enableView($this->view);
339 
340 Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
341 
342 $form=new Zend_Form();
343$name = $form->createElement('text', 'name')
344->setLabel('Your full name')
345->setRequired(true);
346 $birthday = new Zend_Dojo_Form_Element_DateTextBox('birthday');
347 $birthday->setLabel('Birthday');
348 
349 
350 $submit=new Zend_Form_Element_Submit('here');
351 
352 
353 $form->addElements(array($name,$birthday,$submit));
354 $this->view->form=$form;
355 
356 }
witth view:
form ?>

I get the error 'textbox is undefined on line 672 of bootstrap.js and the 
textbox doesn't render. Any help what is cauing this error would be 
apprecidated.

Here's outputed html:



Content Frame





//




//



 


Your full name


Birthday


 



  

Re: [fw-general] Zend_View_Helper_TagCloud is ready for review

2008-11-21 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Heh, Gotta answer myself.

After a talk with some other guys I came to the conclusion, that this
topic is to huge for a view helper. So I will go on and rewrite the
proposal today, hence wait for comments.

Ben
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::


Ben Scholzen 'DASPRiD' schrieb:
> Hey peeps,
> 
> just to inform you, I've just create a proposal (and the code) for a new
> view helper, so you may probably want to take a look at it:
> 
> http://framework.zend.com/wiki/display/ZFPROP/Zend_View_Helper_TagCloud+-+Ben+Scholzen
> 
> Regards,
> Ben
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkm8wQACgkQ0HfT5Ws789CojwCdGPg7Qn61QSIA6+0jm9gDTXrq
gdsAoMukdePKC4+TSNOAC+sKKiDBAbAG
=Tzko
-END PGP SIGNATURE-


Re: [fw-general] Zend_Search_Lucene timeout / loop problem

2008-11-21 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Yeah I'm pretty sure.

...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::


sandstrom schrieb:
> The bug seem to be on searching. I have problem with timeouts on commit();
> 
> $search = new Zend_Search_Lucene(...);
> $search->find('*');
> 
> Are you sure that it this this bug that is affecting me?
> 
> 
> /Alex
> 
> 
> DASPRiD wrote:
> The bug is known and reported. Vote for it to get it fixed:
> 
> http://framework.zend.com/issues/browse/ZF-3321
> ...
> :  ___   _   ___ ___ ___ _ ___:
> : |   \ /_\ / __| _ \ _ (_)   \   :
> : | |) / _ \\__ \  _/   / | |) |  :
> : |___/_/:\_\___/_| |_|_\_|___/   :
> :::
> : Web: http://www.dasprids.de :
> : E-mail : [EMAIL PROTECTED]   :
> : Jabber : [EMAIL PROTECTED] :
> : ICQ: 105677955  :
> :::
> 
> 
> sandstrom schrieb:
 Sometimes the error is instead:
 Fatal error: Maximum execution time of 30 seconds exceeded in
 [root_dir]/library/Zend/Search/Lucene/Index/SegmentWriter.php on line 616


>>
>>

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkm2rYACgkQ0HfT5Ws789D5BgCgtd80sOlAeLAg1hoZnXaXZCvV
yQ0An3rxmpyghouuKI0YxWUdb02z8/dB
=/v3E
-END PGP SIGNATURE-


[fw-general] Zend_View_Helper_TagCloud is ready for review

2008-11-21 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey peeps,

just to inform you, I've just create a proposal (and the code) for a new
view helper, so you may probably want to take a look at it:

http://framework.zend.com/wiki/display/ZFPROP/Zend_View_Helper_TagCloud+-+Ben+Scholzen

Regards,
Ben
- --
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkm2lYACgkQ0HfT5Ws789ALWQCeNYMxZpKmvzrQgfSPrEKxKd/t
Sg8An0XT4ggp9NC6a/PJhCJgoEKXjwbW
=/w0T
-END PGP SIGNATURE-


Re: [fw-general] Zend_Search_Lucene timeout / loop problem

2008-11-21 Thread sandstrom

The bug seem to be on searching. I have problem with timeouts on commit();

$search = new Zend_Search_Lucene(...);
$search->find('*');

Are you sure that it this this bug that is affecting me?


/Alex


DASPRiD wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> The bug is known and reported. Vote for it to get it fixed:
> 
> http://framework.zend.com/issues/browse/ZF-3321
> ...
> :  ___   _   ___ ___ ___ _ ___:
> : |   \ /_\ / __| _ \ _ (_)   \   :
> : | |) / _ \\__ \  _/   / | |) |  :
> : |___/_/:\_\___/_| |_|_\_|___/   :
> :::
> : Web: http://www.dasprids.de :
> : E-mail : [EMAIL PROTECTED]   :
> : Jabber : [EMAIL PROTECTED] :
> : ICQ: 105677955  :
> :::
> 
> 
> sandstrom schrieb:
>> 
>> Sometimes the error is instead:
>> Fatal error: Maximum execution time of 30 seconds exceeded in
>> [root_dir]/library/Zend/Search/Lucene/Index/SegmentWriter.php on line 616
>> 
>> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkkmzdQACgkQ0HfT5Ws789CZMQCfdn9Uyshm40TN2y0I1ywgGLlX
> VxQAoMNde8aSk+DU87kmtPr6I36ZdfnM
> =lSG5
> -END PGP SIGNATURE-
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Search_Lucene-timeout---loop-problem-tp20619922p20623228.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Microsoft Dynamics AX vs. soap-enc:Array

2008-11-21 Thread FredW

I'd like to suggest using the Zend_Soap_Server in wsdl mode with
class-mapping to accomplish what you want to do. Create the wsdl manually
(not fun) or with something like Zend Studio's wsdl editor. Then map those
classes to the corresponding complex types in the wsdl. A couple class
declarations are listed below.

The sequence of GradeTypes in the StudentType will be represented as an
array of Grade objects in the grade() member variable when the soap server
returns it to your application code.

The class-map option to the Zend_Soap_Server's constructor would look like:
'classmap' => array('StudentType' => 'Student', 'GradeType' => 'Grade')

Hope this helps. Regards,
-FW

class Grade
{

/**
 * Graded Item ID
 *
 * @var string
 */
public $gid;

/**
 * Time Modified
 *
 * @var datetime
 */
public $effdate;

/**
 * Grade - element value
 *
 * @var string
 */
public $_;

/**
 * Grade class constructor
 *
 * @param string $gid
 * @param string $effdate
 * @param string $value
 */
public function __construct($gid = null, $effdate = null, $value = null)
{

$this->gid  = $gid;
$this->effdate  = $effdate;
$this->_= $value;

}

}

/**
 * Student class - (SOAP) Used as a data container that will be serialized
back to consumer as a student element.
 * Associated to the WSDL using a classmap.
 */
class Student
{

/**
 * Student ID
 *
 * @var string
 */
public $sid;

/**
 * Student Name
 * 
 * @var string
 */
public $name;

/**
 * Grade - element value
 *
 * @var Grade()
 */
public $grade;


/**
 * Student class constructor
 *
 * @param string $sid
 * @param string $name
 */
public function __construct($sid = null, $name = null)
{
$this->sid  = $sid;
$this->name = $name;

$this->grade = array();
}

}


Fragments of the wsdl:

























Jan Pieper wrote:
> 
> Hi guys,
> 
> I set up an soap service with Zend_Soap_Server and WSDL generation via
> Zend_Soap_AutoDiscover and it should be used via Microsoft Dynamics AX.
> But it
> seems that it cannot handle "soap-enc:Array" datatype.
> 
> Detail: Beim Ausführen einer WSDL-Importerweiterung wurde eine Ausnahme
> ausgelöst:
> System.ServiceModel.Description.XmlSerializerMessageContractImporter
> Fehler: Der Datentyp 'http://schemas.xmlsoap.org/soap/encoding/:Array' ist
> nicht
> vorhanden.
> 
> Sorry for the german error message but it says something like "exception
> [exceptionName] occured" and "datatype [url] is not available".
> 
> Any clue how to get it working?
> 
> -- Jan
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Microsoft-Dynamics-AX-vs.-soap-enc%3AArray-tp20618684p20622942.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Search_Lucene timeout / loop problem

2008-11-21 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

The bug is known and reported. Vote for it to get it fixed:

http://framework.zend.com/issues/browse/ZF-3321
...
:  ___   _   ___ ___ ___ _ ___:
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:::
: Web: http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED]   :
: Jabber : [EMAIL PROTECTED] :
: ICQ: 105677955  :
:::


sandstrom schrieb:
> 
> Sometimes the error is instead:
> Fatal error: Maximum execution time of 30 seconds exceeded in
> [root_dir]/library/Zend/Search/Lucene/Index/SegmentWriter.php on line 616
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkmzdQACgkQ0HfT5Ws789CZMQCfdn9Uyshm40TN2y0I1ywgGLlX
VxQAoMNde8aSk+DU87kmtPr6I36ZdfnM
=lSG5
-END PGP SIGNATURE-


[fw-general] Getting Module name from custom Route mask using Zend_Controller_Router?

2008-11-21 Thread drj201

Hi all,

I have the following route in my application:

$route  = new Zend_Controller_Router_Route_Regex(

'MODULE_HERE/news/[0-9a-z\._!;,\+\-%]+-(\d+)',

array(
   'module' => 'MODULE_HERE',
'controller' => 'entry',
'action' => 'view'
),

array(
'id' => 1
)

);

I want this route to map to URLs:

http://www.example.com/MODULE_NAME/news/news-1
http://www.example.com/MODULE_NAME/news/more-news-2

This needs to forward request above (mask) to the entry controller / view
action equivalents :

http://www.example.com/MODULE_NAME/entry/view/id/1
http://www.example.com/MODULE_NAME/entry/view/id/2

The problem I am facing is getting the MODULE_NAME from the route URL and
using it to map to the entry controller/view action of the correct
MODULE_NAME.

Using the default router works fine and detects module i.e. typing the
following directly as URL works:
http://www.example.com/MODULE_NAME/entry/view/id/1 but using my route mask
does not...

Can somebody please help me?

Thanks,

David







-- 
View this message in context: 
http://www.nabble.com/Getting-Module-name-from-custom-Route-mask-using-Zend_Controller_Router--tp20622773p20622773.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Feed Error

2008-11-21 Thread Maxime P

Hi Everybody!

I have a problem on Zend_Feed.

When i do that it returns me an exception "Invalid chunk size ... unable to
read chunked body"

There my code:
try {
$this->view->flux =
Zend_Feed::import('http://feedproxy.google.com/francaistechcrunch');
} catch (Exception $e) {
echo "Une exception a été interceptée lors de l'importation du flux:
{$e->getMessage()}\n";
exit;
}

I don't understand this error.
Can you help me?
Thanks in advance!


-- 
View this message in context: 
http://www.nabble.com/Zend_Feed-Error-tp20622594p20622594.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] FCKEditor and Zend_Form integration

2008-11-21 Thread drj201

To follow up my initial post I also resorted to a simple jQuery bind noted
here:

http://www.fyneworks.com/jquery/FCKEditor/

This allows use of FCKEditor and maintains Zend Form validation etc.

David



drj201 wrote:
> 
> Hi all,
> 
> I want to integrate FCKEditor (WYSIWYG) into a Zend_Form thus bringing all
> the benefits that allows...
> 
> Note: Im not talking of simply getting FCKEditor to work in the view etc
> (ala here:
> http://blog.ekini.net/2007/11/28/using-fckeditor-with-zend-framework-file-browser-enabled/#comments)
> but actually integrating it into Zend_Form.
> 
> Has anyone done this before? What would be your recommended approach? Is
> it even possible without  investing 100's of man hours and hacking the
> framework to death? :-(
> 
> I first thought of simply dumping the HTML required by FCKEditor into a
> decorator but this is not the answer.
> 
> I then thought of creating a new Zend_Form_Element and overwriting the
> render method to simply return the HTML like so:
> 
>   public function render(Zend_View_Interface $view = null)
>   {
>   
>   $oFCKeditor = new FCKeditor_FCKeditor('FCKeditor1');
>   $oFCKeditor->BasePath = '/js/FCKeditor/';
>   $oFCKeditor->Value = $this->getValue();
>   
>   return $oFCKeditor->CreateHtml();
>   
>   } 
> 
> Neither of the above provide any real integration with Zend_Form however!
> Using the above method for example it is not possible to wrap the element
> in Decorators or add a Label. It also doesnt provide integration when
> using $form->getValues(). The FCKEditor form field only shows in $_POST.
> 
> Maybe a ViewScript Decorator is the answer? Wait for the Editor Dijit
> (even though it is nowhere as comprehensive)?
> 
> What would you guys suggest?
> 
> Regards,
> 
> David
> 

-- 
View this message in context: 
http://www.nabble.com/FCKEditor-and-Zend_Form-integration-tp19688738p20622010.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Search_Lucene timeout / loop problem

2008-11-21 Thread sandstrom


Sometimes the error is instead:
Fatal error: Maximum execution time of 30 seconds exceeded in
[root_dir]/library/Zend/Search/Lucene/Index/SegmentWriter.php on line 616


-- 
View this message in context: 
http://www.nabble.com/Zend_Search_Lucene-timeout---loop-problem-tp20619922p20620434.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How the heck do you go into production mode?

2008-11-21 Thread Matthew Weier O'Phinney
-- Behzad <[EMAIL PROTECTED]> wrote
(on Friday, 21 November 2008, 12:38 PM +0330):
> Using ZF1.6, I just went to production today, but got the following error:
> 
> Uncaught exception 'Zend_Controller_Action_Exception' with message
> 'ViewRenderer initialization failed: retrieved view base path is empty'
> 
> and I'm still struggling to find out the main source of the problem. Anyone
> could help me?
> Have you ever faced with this error?
> 
> By the way, this is the relevant part of the code:
> 
> $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper
> ('viewRenderer');
> $viewRenderer->initView();
> $viewRenderer->setViewBasePathSpec(APP_DIR . '/languages/' . $lang . 
> '/
> views/:module');
> $viewRenderer->view
> ->setEncoding('UTF-8')
> ->addHelperPath(
> APP_DIR . '/languages/' . $lang . '/views/' .
> $this->_frontController->getDispatcher()->getDefaultModule() .
> '/helpers', 'My_View_Helper_')
> ->doctype('XHTML1_STRICT');
> 
> As you see, I've already set the base path, so what's wrong here?

That exception is called from initView(), which is in turn called from
init() -- which is triggered each time an action controller is
instantiated. The exception is triggered when the ViewRenderer is unable
to determine the path to view scripts for the current module --
something that would only happen if each of the module, controller, and
action were empty in the request. Considering that the default route
provides defaults, my guess is that you have replaced the default route.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] Zend_Search_Lucene timeout / loop problem

2008-11-21 Thread sandstrom

I am trying to familiarize with Zend Lucene. However, I have run into some
trouble on one of the first examples.

On $index->commit(); the CPU peaks, and PHP just keeps running until the
maximum execution time is reached. Tested increasing the maximum execution
time, which didn't help. My guess is that it gets stuck in a loop somewhere.

The error that is output is:
Fatal error: Maximum execution time of 30 seconds exceeded in [application
root]/library/Zend/Search/Lucene/Storage/File/Filesystem.php on line 160


OS: OS X 10.5 (also tried Ubuntu 8.04LTS)
ZF: 1.7.0
PHP: 5.2.6

I am using the following code:

http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html#zend.search.lucene.index-creation.creating

$doc = new Zend_Search_Lucene_Document();

$doc->addField(Zend_Search_Lucene_Field::Text('url',
'http://www.testing.com'));
$doc->addField(Zend_Search_Lucene_Field::UnStored('contents', 'happy
content'));

$index->addDocument($doc);


print("pre commit");

$index->commit();

print("post commit");

-- 
View this message in context: 
http://www.nabble.com/Zend_Search_Lucene-timeout---loop-problem-tp20619922p20619922.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Pdf - layer

2008-11-21 Thread nihilest

Hi!

I've a document with three different layers: mask, design and pattern.
I'd like to import a picture in the design layer of this PDF-Doctument, or
alternatively create a new layer to import it between mask and pattern.
Is this possible with Zend_Pdf or would it be possible in the future?

Best regrads
nihilfire
-- 
View this message in context: 
http://www.nabble.com/Zend_Pdf---layer-tp20619811p20619811.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Using Zend_Db_Table_Rowset on a returned set

2008-11-21 Thread CatharsisJelly

Hello,


I have had to kind of hack something together.  Well let me put it this way,
if feels like a hack.  I am grabbing a selection from a db using a join.



$db = $table->getAdapter();
$select = $db->select()
->from( array( 'l' => 'log_email' ), array( 'l.Recipients', 'l.Sender',
'l.Subject', 'l.Date', 'COUNT(s.ID) as Source', 'COUNT(d.ID) as
Destination') )
->joinLeft( array( 's' => 'associations' ), 's.SourceID = l.LoggerID' )
->joinLeft( array( 'd' => 'associations' ), 'd.DestinationID = 
l.LoggerID'
)
->where('l.Recipients LIKE ?', '%' . $this->_getParam('Recipient') . 
'%')
->where('l.Sender LIKE ?', '%' . $this->_getParam('Sender') . '%' )
->where('l.Subject LIKE ?'   , '%' . $this->_getParam('Subject') . '%' 
);


Now $table is an instance of Zend_Db_Table_Abstract that is looking at the
log_email table (LogEmail), but because I want to join in the two counters I
have had to use the DB adapter.


My problem was that this just returns me an array of results and in my
LogEmailRow class (the row class of LogEmail) I need to process some data in
one of the columns so I needed force the results into the relevant
structure.  Ass demonstrated below.



$stmt = $select->query();
$dbRowSet = $stmt->fetchAll();

$rowSet = new Zend_Db_Table_Rowset( array(
'data' => $dbRowSet,
'table' => 'log_email',
'rowClass' => 'Models_DbTable_LogEmailRow'
));


Now I have the rowset I want and any row I pull out will have the data in
the relevant column processed.  Now this feels like a bit of a hack but
works perfectly for my needs.  Im open to suggestions as to how I can do
this another way


Happy Friday to you all who are still in Friday

- Chris

-- 
View this message in context: 
http://www.nabble.com/Using-Zend_Db_Table_Rowset-on-a-returned-set-tp20619749p20619749.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Microsoft Dynamics AX vs. soap-enc:Array

2008-11-21 Thread Jan Pieper
I have to define my own datatype? But how to get a list without an array in php?

-- Jan

> Jan Pieper wrote:
>> Hi guys,
>>
>> I set up an soap service with Zend_Soap_Server and WSDL generation via
>> Zend_Soap_AutoDiscover and it should be used via Microsoft Dynamics AX. But 
>> it
>> seems that it cannot handle "soap-enc:Array" datatype.
>>
>> Detail: Beim Ausführen einer WSDL-Importerweiterung wurde eine Ausnahme
>> ausgelöst: 
>> System.ServiceModel.Description.XmlSerializerMessageContractImporter
>> Fehler: Der Datentyp 'http://schemas.xmlsoap.org/soap/encoding/:Array' ist 
>> nicht
>> vorhanden.
>>
>> Sorry for the german error message but it says something like "exception
>> [exceptionName] occured" and "datatype [url] is not available".
>>
>> Any clue how to get it working?
>>
>> -- Jan
>>   
> Here are the Web Services Interoparability Organization
>  recommendations for declaration of array types
> (/soapenc:Array/):
> 
> "The recommendations in WSDL 1.1 Section 2.2 for declaration of array
> types have been interpreted in various ways, leading to interoperability
> problems. Further, there are other clearer ways to declare arrays."
> 
> http://www.ws-i.org/Profiles/BasicProfile-2_0(WGD).html#soapenc_Array
> 
> Regards,
> Radu Gasler


Re: [fw-general] Microsoft Dynamics AX vs. soap-enc:Array

2008-11-21 Thread Radu Gasler

Jan Pieper wrote:

Hi guys,

I set up an soap service with Zend_Soap_Server and WSDL generation via
Zend_Soap_AutoDiscover and it should be used via Microsoft Dynamics AX. But it
seems that it cannot handle "soap-enc:Array" datatype.

Detail: Beim Ausführen einer WSDL-Importerweiterung wurde eine Ausnahme
ausgelöst: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Fehler: Der Datentyp 'http://schemas.xmlsoap.org/soap/encoding/:Array' ist nicht
vorhanden.

Sorry for the german error message but it says something like "exception
[exceptionName] occured" and "datatype [url] is not available".

Any clue how to get it working?

-- Jan
  
Here are the Web Services Interoparability Organization 
 recommendations for declaration of array types 
(/soapenc:Array/):


"The recommendations in WSDL 1.1 Section 2.2 for declaration of array 
types have been interpreted in various ways, leading to interoperability 
problems. Further, there are other clearer ways to declare arrays."


http://www.ws-i.org/Profiles/BasicProfile-2_0(WGD).html#soapenc_Array

Regards,
Radu Gasler


[fw-general] Microsoft Dynamics AX vs. soap-enc:Array

2008-11-21 Thread Jan Pieper
Hi guys,

I set up an soap service with Zend_Soap_Server and WSDL generation via
Zend_Soap_AutoDiscover and it should be used via Microsoft Dynamics AX. But it
seems that it cannot handle "soap-enc:Array" datatype.

Detail: Beim Ausführen einer WSDL-Importerweiterung wurde eine Ausnahme
ausgelöst: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Fehler: Der Datentyp 'http://schemas.xmlsoap.org/soap/encoding/:Array' ist nicht
vorhanden.

Sorry for the german error message but it says something like "exception
[exceptionName] occured" and "datatype [url] is not available".

Any clue how to get it working?

-- Jan


Re: [fw-general] Passing an array from PHP to Javascript

2008-11-21 Thread Martijn Korse


dele454 wrote:
> 
> Thanks for the tips. But i CAN'T apply any of them now. The design has
> been approved and i need to i implement things as they are. 'Over
> engineered' - I dont care. As long my code works as expected. I simply
> want to pass my PHP array into my javascript function. - very simple code
> i dont see why i need to implement a library just for that.

Here's a solution that doesn't require a library:

http://devshed.excudo.net/scripts/javascript/source/php-array+2+javascript-array

-
http://devshed.excudo.net http://devshed.excudo.net 
-- 
View this message in context: 
http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19511848p20617910.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] FCKEditor and Zend_Form integration

2008-11-21 Thread till
On Fri, Nov 21, 2008 at 9:11 AM, Marko Korhonen
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I use "class" attribute to "bind" FCKeditor to textarea fields.
>
> Example (I use ini files):
> ; content element
> form.elements.content.type = "textarea"
> form.elements.content.options.required = true
> form.elements.content.options.label = "Content"
> form.elements.content.options.attribs.class = "editor"
>
> And in my global JavaScript (jQuery example):
>
> ta = $(".editor"); // find all textareas with editor class
>
>$.each(ta, function(i, textarea){
>
>var oFCKeditor = new FCKeditor(textarea.name);
>
>oFCKeditor.BasePath = baseUrl +"js/fckeditor/";
>oFCKeditor.ToolbarSet = "Basic"; // Here you could make some 
> logic how to
> set different toolbarset, maybe adding more classes to the textarea?
> class="editor Default"
>
> // if ($(textarea).hasClass("Default")) oFCKeditor.ToolbarSet = "Default"
>
>oFCKeditor.ReplaceTextarea();
>
>})
>
> And of course I add fckeditor.js to my actions where I render forms.
>
> br,
> Marko

Just wanted to second Marko's solution since I did almost the same.
Almost because I had a single text field and used an ID to bind
fckeditor - $('#wysiwyg'). ;-) (The ID selector should be slightly
faster in that case.)

So far this seems to be the most clean integration between Zend_Form
and fckeditor. No hacking necessary. :-)

Till


Re: [fw-general] How the heck do you go into production mode?

2008-11-21 Thread till
On Wed, Nov 19, 2008 at 5:50 PM, MrEMan <[EMAIL PROTECTED]> wrote:
>
> I've been developing a Zend app for awhile now. It's a project I adopted from
> a previous contractor and I am not the one responsible for deploying it.
> I've recently encountered a production bug and really need to run the app in
> production mode locally to figure this out.
>
> How do I run my Zend Framework app in production? It must be obvious,
> because it doesn't seem to be documented _anywhere_.
>
> Thanks

I store my configuration details in Zend_Config_Ini. I have different
section in there, [production], [staging:production], etc.. The
environment is set in my "index.php", which means that trunk is always
[staging] (or development). When we deploy a release, we create a tag
in SVN where, once it's created, I change the environment.

We checkout the tag to a new folder in production, so for example, on
one of my frontends, the directory layout is as follows:

/usr/www/domain.com/1.0
/usr/www/domain.com/1.1
/usr/www/domain.com/1.2
...

Each folder contains the entire application - including ZendFramework
code, etc.. The directories are symlinked from
/usr/www/domain.com/www. This allows us to rollback anytime without
going nuts. ;-)

For other dependencies - such as PHP version, extension, PEAR
packages, etc. - I started creating a meta PEAR package which i keep
updated and distribute using a private PEAR channel.

I install it via, "pear install VendorMeta-1.0.0.tgz" and it will
alert me in case dependencies are not met.

The meta PEAR package is pretty slim - it contains a pretty
comprehensive package.xml, which has all the dependencies listed.
Staying up to date doesn't get any easier than this.

Cheers,
Till


Re: [fw-general] How the heck do you go into production mode?

2008-11-21 Thread Behzad
Using ZF1.6, I just went to production today, but got the following error:

*Uncaught exception 'Zend_Controller_Action_Exception' with message
'ViewRenderer initialization failed: retrieved view base path is empty'*

and I'm still struggling to find out the main source of the problem. Anyone
could help me?
Have you ever faced with this error?

By the way, this is the relevant part of the code:

$viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
$viewRenderer->initView();
*$viewRenderer->setViewBasePathSpec(APP_DIR . '/languages/' . $lang
. '/views/:module');*
$viewRenderer->view
->setEncoding('UTF-8')
->addHelperPath(
APP_DIR . '/languages/' . $lang . '/views/' .
$this->_frontController->getDispatcher()->getDefaultModule()
.
'/helpers', 'My_View_Helper_')
->doctype('XHTML1_STRICT');

As you see, I've already set the base path, so what's wrong here?


Re: [fw-general] Re: $cache->start() and caching with Zend_Translate together, possible bug?

2008-11-21 Thread Thomas Weidner
Maybe I am missing something, but the example you gave does not call 
cache->start().
And the manual of Zend_Cache states that when calling start, the cache will 
fetch all output of the complete page which is sent to browser and write it 
to the cache. And it will do this until the script has finished which means 
that all content is stored which is produced.


You can use the same cache as long as the classes which use the cache store 
their data in different ids.
All I18N classes use this behaviour, therefor you can use the same cache for 
all I18N classes.


I still believe that this is a misusage.
But you are free to correct me. :-)

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "kirpit" <[EMAIL PROTECTED]>

To: "Thomas Weidner" <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, November 21, 2008 9:01 AM
Subject: Re: [fw-general] Re: $cache->start() and caching with 
Zend_Translate together, possible bug?




Hey, don't you offence my friend and no need triple exclamation marks like
that. I'm just here trying to be developer who gives feedbacks about
possible issues. Something like payback to usage of such a nice
architectured and totally free, open source framework. Get it?

First, of course sometimes i miss the parts of documantation but i do read
documantation starting from this example;
http://framework.zend.com/manual/en/zend.translate.adapter.html#zend.translate.adapter.caching
which is using "Page" as cache frontend.in zend_translate.

And second, please don't take this as complaining but i'm just wondering 
how

is it working the same $cache object for zend_date right before
zend_translate in bootstrap;
Zend_Date::setOptions(array('cache' => $cache));
(I'm not that low level programmer and didn't go through the ZF codes)

If you want us to dig this mailing group only for "how to"s and never show
up for the question marks, that is fine for me.

21 Kasım 2008 Cuma 09:12 tarihinde Thomas Weidner 
<[EMAIL PROTECTED]>yazdı:



Please read manual about how cache frontends work !!!

You used "Page" as Cache frontend.
According to manual:
Zend_Cache_Frontend_Page is like Zend_Cache_Frontend_Output but designed
for a complete page. It's impossible to use Zend_Cache_Frontend_Page for
caching only a single block.

Is there any reason why you want to have also the page input within the
same cache data as translation ?

Of course this can not work when other data are also added to the
translation cache within the same cache id.

This is definitly a problem of a misused cache.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - From: "kirpit" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 21, 2008 2:05 AM
Subject: [fw-general] Re: $cache->start() and caching with Zend_Translate
together, possible bug?


 Ok, what I do, I write here step by step.


I have re-downloaded ZF 1.7. I removed everything under TEMP_DIR folder. 
I

removed every single localhost cookie.

I commented $cache->start(); line and uncommented
Zend_Translate::setCache($cache); line. And I have entered main page.
Everything looks very fine (while not cache hitting) and I have a file
zend_cache--zend_translate_full_csv_file_path filled with correct
translation table, serialized under temp dir next to some small metadata
files.

Then I removed again cookies and everything under temp dir. I comment
translate cache and uncomment $cache->start(). There is no cache hit as
expected. I do have fetched output in a file named zend_cache--someMd5 
but

i
do not have any cache file about zend_translation under temp dir as
expected.

I only remove cookies, leaving temp dir as it is. There is cache hit as
expected and response time is 19ms (wow, here i adore ZF).

I check cookies (well there is none as cache hits), remove files under
temp
folder. I uncomment both of them. Enter the mainpage. What i have under
temp
dir is a file named zend_cache--zend_translate_full_csv_file_path. And
guess
what is inside? Fetched and serialized html output of page! :)

Yes, there is no any other file bigger than 1 kb. under temp.

Bug?

-- Yönlendirilmiş ileti --
From: "Thomas Weidner" <[EMAIL PROTECTED]>
To: 
Date: Thu, 20 Nov 2008 07:34:19 +0100
Subject: Re: [fw-general] $cache->start() and caching with 
Zend_Translate

together, possible bug?
Sorry, but on the first look this seems to be a cache problem and not a
translation one.
Looking at the lines you provide I see that at line 435 the cache is
loaded...
$result = self::$_cache->load($id);
which happens without problems.

And then the cache is unserialized.
unserialize($result);
All translate classes are serializing the data before writing to cache 
so

this can not be a problem.

In my opinion there are only 4 things which can corrupt this behaviour.

1.) You are using an outdated cache after an update of ZF
2.) Someone writes manually to the translation cache witho

Re: [fw-general] Re: $cache->start() and caching with Zend_Translate together, possible bug?

2008-11-21 Thread Thomas Weidner

Please read manual about how cache frontends work !!!

You used "Page" as Cache frontend.
According to manual:
Zend_Cache_Frontend_Page is like Zend_Cache_Frontend_Output but designed for 
a complete page. It's impossible to use Zend_Cache_Frontend_Page for caching 
only a single block.


Is there any reason why you want to have also the page input within the same 
cache data as translation ?


Of course this can not work when other data are also added to the 
translation cache within the same cache id.


This is definitly a problem of a misused cache.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

- Original Message - 
From: "kirpit" <[EMAIL PROTECTED]>

To: 
Sent: Friday, November 21, 2008 2:05 AM
Subject: [fw-general] Re: $cache->start() and caching with Zend_Translate 
together, possible bug?




Ok, what I do, I write here step by step.

I have re-downloaded ZF 1.7. I removed everything under TEMP_DIR folder. I
removed every single localhost cookie.

I commented $cache->start(); line and uncommented
Zend_Translate::setCache($cache); line. And I have entered main page.
Everything looks very fine (while not cache hitting) and I have a file
zend_cache--zend_translate_full_csv_file_path filled with correct
translation table, serialized under temp dir next to some small metadata
files.

Then I removed again cookies and everything under temp dir. I comment
translate cache and uncomment $cache->start(). There is no cache hit as
expected. I do have fetched output in a file named zend_cache--someMd5 but 
i

do not have any cache file about zend_translation under temp dir as
expected.

I only remove cookies, leaving temp dir as it is. There is cache hit as
expected and response time is 19ms (wow, here i adore ZF).

I check cookies (well there is none as cache hits), remove files under 
temp
folder. I uncomment both of them. Enter the mainpage. What i have under 
temp
dir is a file named zend_cache--zend_translate_full_csv_file_path. And 
guess

what is inside? Fetched and serialized html output of page! :)

Yes, there is no any other file bigger than 1 kb. under temp.

Bug?

-- Yönlendirilmiş ileti --
From: "Thomas Weidner" <[EMAIL PROTECTED]>
To: 
Date: Thu, 20 Nov 2008 07:34:19 +0100
Subject: Re: [fw-general] $cache->start() and caching with Zend_Translate
together, possible bug?
Sorry, but on the first look this seems to be a cache problem and not a
translation one.
Looking at the lines you provide I see that at line 435 the cache is
loaded...
$result = self::$_cache->load($id);
which happens without problems.

And then the cache is unserialized.
unserialize($result);
All translate classes are serializing the data before writing to cache so
this can not be a problem.

In my opinion there are only 4 things which can corrupt this behaviour.

1.) You are using an outdated cache after an update of ZF
2.) Someone writes manually to the translation cache without serializing 
the

data
3.) Someone uses own written adapter which corrupt the cache
4.) You have a corrupted ZF version... try a update to fix the broken 
files


Of course it could be that there is a problem in Zend_Cache itself, but I
dont believe this, because your problem is thrown in unserialize. Why 
should
Zend_Cache change the stored data. And Zend_Translate stores only 
serialized

strings.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


2008/11/20 kirpit <[EMAIL PROTECTED]>


Hi ZF people.

I have following lines in bootstrap with ZF v1.7 running on php 5.2.6:

>

$cache = Zend_Cache::factory('Page', 'File', array(
 'lifetime' => 60 * 60 * 12,
 'regexps' => array(
  // cache whole indexController
  '^' . BASE_PATH . '$' => array(
  'cache' => true),
  // cache whole indexController
  '^' . BASE_PATH . 'index' => array(
  'cache' => true),
  // cache whole iController
  '^' . BASE_PATH . 'i/' => array(
  'cache' => true),
  // cache ajax/get-suggest
  '^' . BASE_PATH . 'ajax/get-suggest' => array(
  'cache' => true,
  'cache_with_get_variables' => true,
  'cache_with_session_variables' => true,
  'cache_with_cookie_variables' => true,
  'make_id_with_get_variables' => true,
  'make_id_with_session_variables' => false,
  'make_id_with_cookie_variables' => false))), array(
 'cache_dir' => TEMP_DIR));
$cache->start();

// ... more later

Zend_Translate::setCache($cache);
$translate = new Zend_Translate('csv', DOC_ROOT . 'language' . DS .
'tr_TR.csv', 'tr_TR');
Zend_Registry::set('Zend_Translate', $translate);

>

And it produces following errors:

Warning: unserialize() expects parameter 1 to be string, array given in
...\Zend\Translate\Adapter.php on line 436

Notice: No translation for the language 'tr_TR' available. in
...\Zend\Translate\Adapter.php on line 307

Notice: No translation for the language 'tr_TR' available. in
...\Zend\Translate\Adapter.php on lin

Re: [fw-general] FCKEditor and Zend_Form integration

2008-11-21 Thread Marko Korhonen

Hi,

I use "class" attribute to "bind" FCKeditor to textarea fields.

Example (I use ini files):
; content element
form.elements.content.type = "textarea"
form.elements.content.options.required = true
form.elements.content.options.label = "Content"
form.elements.content.options.attribs.class = "editor"

And in my global JavaScript (jQuery example):

ta = $(".editor"); // find all textareas with editor class

$.each(ta, function(i, textarea){

var oFCKeditor = new FCKeditor(textarea.name);

oFCKeditor.BasePath = baseUrl +"js/fckeditor/";
oFCKeditor.ToolbarSet = "Basic"; // Here you could make some 
logic how to
set different toolbarset, maybe adding more classes to the textarea?
class="editor Default"

// if ($(textarea).hasClass("Default")) oFCKeditor.ToolbarSet = "Default"

oFCKeditor.ReplaceTextarea();

})

And of course I add fckeditor.js to my actions where I render forms.

br,
Marko
-- 
View this message in context: 
http://www.nabble.com/FCKEditor-and-Zend_Form-integration-tp19688738p20616806.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Re: $cache->start() and caching with Zend_Translate together, possible bug?

2008-11-21 Thread kirpit
Hey, don't you offence my friend and no need triple exclamation marks like
that. I'm just here trying to be developer who gives feedbacks about
possible issues. Something like payback to usage of such a nice
architectured and totally free, open source framework. Get it?

First, of course sometimes i miss the parts of documantation but i do read
documantation starting from this example;
http://framework.zend.com/manual/en/zend.translate.adapter.html#zend.translate.adapter.caching
which is using "Page" as cache frontend.in zend_translate.

And second, please don't take this as complaining but i'm just wondering how
is it working the same $cache object for zend_date right before
zend_translate in bootstrap;
Zend_Date::setOptions(array('cache' => $cache));
(I'm not that low level programmer and didn't go through the ZF codes)

If you want us to dig this mailing group only for "how to"s and never show
up for the question marks, that is fine for me.

21 Kasım 2008 Cuma 09:12 tarihinde Thomas Weidner <[EMAIL PROTECTED]>yazdı:

> Please read manual about how cache frontends work !!!
>
> You used "Page" as Cache frontend.
> According to manual:
> Zend_Cache_Frontend_Page is like Zend_Cache_Frontend_Output but designed
> for a complete page. It's impossible to use Zend_Cache_Frontend_Page for
> caching only a single block.
>
> Is there any reason why you want to have also the page input within the
> same cache data as translation ?
>
> Of course this can not work when other data are also added to the
> translation cache within the same cache id.
>
> This is definitly a problem of a misused cache.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> - Original Message - From: "kirpit" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, November 21, 2008 2:05 AM
> Subject: [fw-general] Re: $cache->start() and caching with Zend_Translate
> together, possible bug?
>
>
>  Ok, what I do, I write here step by step.
>>
>> I have re-downloaded ZF 1.7. I removed everything under TEMP_DIR folder. I
>> removed every single localhost cookie.
>>
>> I commented $cache->start(); line and uncommented
>> Zend_Translate::setCache($cache); line. And I have entered main page.
>> Everything looks very fine (while not cache hitting) and I have a file
>> zend_cache--zend_translate_full_csv_file_path filled with correct
>> translation table, serialized under temp dir next to some small metadata
>> files.
>>
>> Then I removed again cookies and everything under temp dir. I comment
>> translate cache and uncomment $cache->start(). There is no cache hit as
>> expected. I do have fetched output in a file named zend_cache--someMd5 but
>> i
>> do not have any cache file about zend_translation under temp dir as
>> expected.
>>
>> I only remove cookies, leaving temp dir as it is. There is cache hit as
>> expected and response time is 19ms (wow, here i adore ZF).
>>
>> I check cookies (well there is none as cache hits), remove files under
>> temp
>> folder. I uncomment both of them. Enter the mainpage. What i have under
>> temp
>> dir is a file named zend_cache--zend_translate_full_csv_file_path. And
>> guess
>> what is inside? Fetched and serialized html output of page! :)
>>
>> Yes, there is no any other file bigger than 1 kb. under temp.
>>
>> Bug?
>>
>> -- Yönlendirilmiş ileti --
>> From: "Thomas Weidner" <[EMAIL PROTECTED]>
>> To: 
>> Date: Thu, 20 Nov 2008 07:34:19 +0100
>> Subject: Re: [fw-general] $cache->start() and caching with Zend_Translate
>> together, possible bug?
>> Sorry, but on the first look this seems to be a cache problem and not a
>> translation one.
>> Looking at the lines you provide I see that at line 435 the cache is
>> loaded...
>> $result = self::$_cache->load($id);
>> which happens without problems.
>>
>> And then the cache is unserialized.
>> unserialize($result);
>> All translate classes are serializing the data before writing to cache so
>> this can not be a problem.
>>
>> In my opinion there are only 4 things which can corrupt this behaviour.
>>
>> 1.) You are using an outdated cache after an update of ZF
>> 2.) Someone writes manually to the translation cache without serializing
>> the
>> data
>> 3.) Someone uses own written adapter which corrupt the cache
>> 4.) You have a corrupted ZF version... try a update to fix the broken
>> files
>>
>> Of course it could be that there is a problem in Zend_Cache itself, but I
>> dont believe this, because your problem is thrown in unserialize. Why
>> should
>> Zend_Cache change the stored data. And Zend_Translate stores only
>> serialized
>> strings.
>>
>> Greetings
>> Thomas Weidner, I18N Team Leader, Zend Framework
>> http://www.thomasweidner.com
>>
>>
>> 2008/11/20 kirpit <[EMAIL PROTECTED]>
>>
>>  Hi ZF people.
>>>
>>> I have following lines in bootstrap with ZF v1.7 running on php 5.2.6:
>>>
>>> >
>>>
>>> $cache = Zend_Cache::factory('Page', 'File', array(
>>>  'lifetime'