cakephp 3 - return object data from a function?

2016-01-12 Thread heohni
Hi, I am very new to cake 3 and get stuck within the first steps :-) I am calling a soap api to validate IBAN numbers. $this->client = $this->soap(); $params = array('iban' => $iban); $result = $this->client->validateIban($params); it works fine, I can debug() the results and get the right

Too many count statements

2014-05-16 Thread heohni
Hi, I am just reading in a json string, use json_decode() to get an array and then I walk through this array and do an update statement. Really simple stuff, but in debug mode I can see for each array element the following statements: 1SELECT COUNT(*) AS `count` FROM `tablex`.`data` AS

Pagination option url question

2013-11-12 Thread heohni
Hi, I used this code: $this-Paginator-options(array('url' = array($this-params-url))); and later on: echo $this-Paginator-link('5',array('limit' = '5'), $options = array('escape' = false)); and echo $this-Paginator-sort('price', $text, $options = array('escape' = false, 'direction'='desc',

Migration from 1.3 to 2.1 = Some questions

2013-01-17 Thread heohni
Hi, I used the update script and I get the following error message: MissingControllerException] Controller class Controller could not be found. ...flags.ctp(8): Object-requestAction('sprachen/getLan...') The code within the mentioned file is: $flags =

Why do I get this error mesage?

2012-11-23 Thread heohni
Hi, I wonder why I get always this in my error logs 2012-11-23 11:04:32 Warning: Warning (2): array_merge() [a href='http://php.net/function.array-merge'function.array-merge/a]: Argument #2 is not an array in [/homepages/13/123456/htdocs/lib/Cake/View/Helper/PaginatorHelper.php, line 111]

How to test/simulate sending a form?

2012-11-09 Thread heohni
Hi, I have a running project with a hand full of different forms the user can fill out. There is only one controller to handle the validation and the processing of the forms depending from its content. As all my forms a are done via ajax requests it looks like this: function index() { if

Having trouble with /cake/app and htaccess

2012-11-06 Thread heohni
Hi, I am just about to install a new project on my webserver. The structure is /cake/app The htaccess in /cake is throuing me a error 500 out. If I rename it, I can see a part of my homepage, all database values are right there, but no css, js or some other html areas are missing = so path is

Re: Having trouble with /cake/app and htaccess

2012-11-06 Thread heohni
Well, I need to add the RewriteBase / into my first htaccess. Now I see the homepage and all my date perfectly. But when I hit any link to pages like http://myproject.com/pages/imprint or http://myproject.com/objekts/search/q:Agrofinca I get again a error 500. Do I need to add the

Tutorial to receive data from xml web services?

2012-09-26 Thread heohni
Hi, I wouldlike to learn and understand how to receive data from a xml webservice. But I googled for hours and couldn't find any good explanation. Most of the links I found were talking about how to send data out as XML. But I am looking for getting the data to print them into my view. Does

Formatting paginator question

2012-09-13 Thread heohni
Hi, I would like to have this html syntax: - ul class=pro_pages - li - a href=# class=pro_btn pro_prevspan/span/a - /li - li class=current - a href=# class=pro_btn pro_page1/a - /li - ... - li - a href=# class=pro_btn

Error on sending mail in V1.3

2012-09-12 Thread heohni
Hi, I just discovered a problem when trying to send an email with V.1.3. It was working quite well in the past, I just found the error by chance: I get these errors: *Warning* (2) javascript:void(0);: array_map() [http://php.net/function.array-map]: Argument #2 should be an array

Re: Error on sending mail in V1.3

2012-09-12 Thread heohni
)); } Did I use the wrong a wrong format? Am Mittwoch, 12. September 2012 13:35:50 UTC+2 schrieb heohni: Hi, I just discovered a problem when trying to send an email with V.1.3. It was working quite well in the past, I just found the error by chance: I get these errors: *Warning* (2

Number Problem in V1.3

2012-08-01 Thread heohni
Hi, $this-Number-addFormat('EUR', array('after' = ' €', 'decimals' = ',', 'thousands' = '.', 'negative' = '-')); $this-Number-currency($value, 'EUR'); When I return money amounts, saved in DB as decimal(10,2) it returns the following 25.00 = 25€ correct 0.33 = 33 € not correct!!

Re: set::sort question

2012-07-30 Thread heohni
does anyone has an idea? Am Freitag, 27. Juli 2012 12:36:15 UTC+2 schrieb heohni: Hi, I have this array: Array ( [240] = Array ( [Member] = Array ( [id] = 112 ) [Payment] = Array ( [date] = 0712 ) ) I want to use the set::sort function to sort first for Member.id ASC

Re: set::sort question

2012-07-30 Thread heohni
be a few lines more, but at least you got it in a few minutes instead of waiting for some guru to write it for you. Am Montag, 30. Juli 2012 09:05:06 UTC+2 schrieb heohni: does anyone has an idea? Am Freitag, 27. Juli 2012 12:36:15 UTC+2 schrieb heohni: Hi, I have this array: Array ( [240

set::sort question

2012-07-27 Thread heohni
Hi, I have this array: Array ( [240] = Array ( [Member] = Array ( [id] = 112 ) [Payment] = Array ( [date] = 0712 ) ) I want to use the set::sort function to sort first for Member.id ASC and then for Payment.ASC Can please someone explain me how I need to write the set::sort syntax? I never

Re: Manage large multilingual project

2012-06-27 Thread heohni
Hi, I have this problem. My base is German, means all views contain German word and phrases. Creating now the .pot file and putting this into the locale/deu/LC_MESAAGES/ folder is easy and doable. But I already translated the english version of the .po file. When I do now changes on the views,

Re: XML does not work anymore (changed from one server to another)

2012-06-27 Thread heohni
I solved this by using a php.ini file with this content: allow_url_fopen = On -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To

Re: How to protect a view with htaccess and htpasswd?

2012-06-27 Thread heohni
I solved this issue now by putting the htacess/htpasswd into my files folder. This way anyone could see the view but can't download the files without password. It's not the best solution, but at least the files are protected. -- Our newest site for the community: CakePHP Video Tutorials

Manage large multilingual project

2012-06-09 Thread heohni
Hi, I have a project with currently 5 languages and I am using.po files for the translations. Now the project is live and running and I have to update the site content (static text) and have to include the translations. Right now I feel the work extremely inefficient as I have to replace the

How to protect a view with htaccess and htpasswd?

2012-06-08 Thread heohni
Hi, I have a view to list all files from a files directory. For this view, I would like to use a simple htaccess / htpasswd protection. It's just for internal use to exchange files, so no complex auth is needed. I copied the htaccess into the view folder, but when I call the page there is no

How to order paginated results for more than one order condition?

2012-06-04 Thread heohni
Hi, When I perform a search for results I use this default oder condition: $this-paginate['MyModel']['order'] = typeA ASC, typeB ASC; Within my search form the user can also select to order by typeC asc or desc. When the search is now performed the chosen condition order by typeC asc is

Re: How to order paginated results for more than one order condition?

2012-06-04 Thread heohni
I managed to handle the situation to a certain point. Depening in my search, I get now different order by consitions! Fine so far! For example with this search: /search I have the query order by typeA asc, typeB desc When I have this url /search/sort:typeC/direction:desc/ the order condition

tell ajax pagination to order by 3 fields

2012-06-02 Thread heohni
Hi, I am using the ajax pagination. I have a default ORDER BY rule like ORDER BY price ASC, upload DESC So all my results are automatically ordered by this rule. Fine so far! But now I have a search form, where I want to add a third sort option like articlegroup Users can choose if they want

XML does not work anymore (changed from one server to another)

2012-06-01 Thread heohni
Hi! I just have the problem, that I do extract from a xml feed and display it in a view. It works fine on server1 but not on server2. I get this error message: 2012-06-01 11:02:08 Warning: Warning (2): SimpleXMLElement::__construct(http://www.domain.com/?feed=rss2) [a

how to have dynamic multilingual text strings

2012-05-31 Thread heohni
HI, I wonder how I can handle this: I have a multilingual project and would like to have a text string like this: __('This is a dummy text and here I want to have a %variable% inside the text string'); I am working with .po files msgid This is a dummy text and here I want to have a

Re: Using p28n Component, but having own domain per language

2012-05-24 Thread heohni
Does anyone knows a trick? Am Mittwoch, 23. Mai 2012 11:59:27 UTC+2 schrieb heohni: Hi, I have a project in 5 languages. Until now I had such links to change the language: echo $this-Html-link(__('English'), array('controller' = 'lng/eng'), array('class' = $active2)); It was working

Using p28n Component, but having own domain per language

2012-05-23 Thread heohni
Hi, I have a project in 5 languages. Until now I had such links to change the language: echo $this-Html-link(__('English'), array('controller' = 'lng/eng'), array('class' = $active2)); It was working perfect, when I was on a sub page and changed language, I kept being on the same page, just

Re: Server Move: Catch old details page url and forward to cake style url

2012-05-16 Thread heohni
Hi Mike, these urls /details.php?id=4863 are set in QR codes printed in a magazin. Now we plan to relaunch the new website made with cake. I want to catch these domains to forward them to the new cake-style target page. Therefore I need a way to lead the users to the requested target and not

Re: Server Move: Catch old details page url and forward to cake style url

2012-05-16 Thread heohni
Hi, thanks, I will try! Which htaccess should I use, the one in /webroot/ Am Mittwoch, 16. Mai 2012 11:23:55 UTC+2 schrieb rchavik: On Monday, May 14, 2012 7:08:36 PM UTC+7, heohni wrote: If I try this: (from the 2.0 book) Router::redirect( '/details*', array('controller

Re: Server Move: Catch old details page url and forward to cake style url

2012-05-16 Thread heohni
I can answer this myself sorry! It works great! Thank you s much Am Mittwoch, 16. Mai 2012 11:47:43 UTC+2 schrieb heohni: Hi, thanks, I will try! Which htaccess should I use, the one in /webroot/ Am Mittwoch, 16. Mai 2012 11:23:55 UTC+2 schrieb rchavik: On Monday

Re: Server Move: Catch old details page url and forward to cake style url

2012-05-15 Thread heohni
Please help!! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to

Re: Server Move: Catch old details page url and forward to cake style url

2012-05-14 Thread heohni
If I try this: (from the 2.0 book) Router::redirect( '/details*', array('controller' = 'qrcode', 'action' = 'redirect', array('persist' = true) )); I get this message: The requested address *'/details.php?id=4863'* was not found on this server. What is wrong with my Router? --

Re: Use the comntact model twice but with different required fields

2012-05-08 Thread heohni
rules. Which is a great way of doing it by the way! But what I want to do is to _add_ rule just in that particular case of the catalog order form. What would you suggest? Or didn't I get the sense out of your post? Thanks! Am Montag, 7. Mai 2012 13:08:30 UTC+2 schrieb heohni: Hi, I would

Server Move: Catch old details page url and forward to cake style url

2012-05-08 Thread heohni
Hi, I am just about relaunching a website and they gave out tons of QR Codes with links like: www.domain.com/detail.php?id=1234 What can I do to catch all this domains having the details.php?Id= and forward this to (controller=detail action=index, 1234) Is there a way to handle this with

Use the comntact model twice but with different required fields

2012-05-07 Thread heohni
Hi, I would like to use the contact model on 2 pages. The main contact form, street, postcode and city is not a required field. And a simple order form for catalogs where those fields are required. Is that possible? To have - based on the form - additional fields which need to pass the

404 and other error pages

2012-04-15 Thread heohni
Hi, I googled quite some time arround but I only find here and there some hint, but I found never a kind of complete instruction how to setup custom error layouts for my project. I am using Cake 2.1. Does anyone know a good tutorial link? I aslo read in the book, but I find it also quite hard

Cake Auth userScope ?

2012-04-14 Thread heohni
Hi, if a user try to login and his account is not active yet the login will fail because of this: 'scope' = array('User.usr_active' = 1), Is there anyhow a way to catch this case to display a proper message to the user? Thanks for help!! -- Our newest site for the community: CakePHP Video

Routes to catch complete querystring

2012-04-09 Thread heohni
Hi, depening of used search criterias it can happen that I want to call this url: '/search/cat:10/city:6/sleeps:4/price:3/' But it can be also just '/search/cat:10/city:6/price:3/' or '/search/city:6/sleeps:4/price:3/' or any other combination... That means, I need to have a route what

Re: Routes to catch complete querystring

2012-04-09 Thread heohni
I just found this: Router::connect('/search/*', array('controller' = 'objekts', 'action' = 'search', Router::queryString($this-params['url']))); this returns me this error: *Notice* (8) javascript:void(0);: Undefined property: Dispatcher::$params [*APP\Config\routes.php*, line *48*] But it

Paginator sort and direction within a dropdown option?

2012-04-09 Thread heohni
Hi I want to create a dropdown select to change the order for price asc / desc. As i need this: sort:price/direction:asc How can I add this to my dropdown? How should the syntax look like? $pricesort = array( 'desc' = 'Sort DESC', 'asc' = 'Sort ASC', ); echo $this-Form-input('direction',

Re: sending emails question

2012-04-08 Thread heohni
Yes, ok. Thanks! I wasn't never really aware of looking into the core files *shame* Am Samstag, 7. April 2012 18:37:15 UTC+2 schrieb heohni: Hi, I having a newsletter registration where I want to send an email to the user and to the admin. For now I only send to user this way: // send

Re: $this-Auth-user VERY slow

2012-04-08 Thread heohni
Hi, how can you see the speed this request needs? Am Donnerstag, 5. April 2012 17:00:49 UTC+2 schrieb Dan Moseley: Hi, I have been experiencing extremely long run times for some calls to $this- Auth-user('id'). Most requests spend 0 time in this method, but seemingly random requests are

Auth-userScope is getting ignored

2012-04-08 Thread heohni
Hi, I want to allow only active users to login and I used for this: public function beforeFilter() { parent::beforeFilter(); $this-Auth-userScope = array('User.usr_active' = '1'); } public function login() { if ($this-Auth-login()) { ... But I can still login with inactive users (

Undefined property error message?

2012-04-08 Thread heohni
Hi, sometimes and only sometimes I get this error: Undefined property: View::$Bookmark [*CORE\Cake\View\View.php*, line *804*] *Fatal error*: Call to a member function countBookmarks() on a non-object in *D:\SVN-Homes\PHP\trunk\project\View\Layouts\default.ctp* on line *59* * * default line

AutoLoginComponent Question

2012-04-08 Thread heohni
Hi, I tried to setup this AutoLoginComponent Component from http://www.dereuromark.de/2012/02/02/more-persistent-sessions-in-cake2-x/ But while debugging the script as nothing happend eg no cookie was created I found out that on a initial setup I never pass the initialize function There is

Re: Auth-userScope is getting ignored

2012-04-08 Thread heohni
Update: I found no the way with debug kit how to see the statement. And as I guessed, the userScope is not taking place: WHERE `User`.`username` = 'xx' AND `User`.`password` = 'xx' LIMIT 1 I added public function beforeFilter() { parent::beforeFilter(); $this-Auth-userModel = 'User';

Re: Auth-userScope is getting ignored

2012-04-08 Thread heohni
Update: even if add this for testing $this-Auth-fields = array('username' = 'test', 'password' = 'test' ); This is also ignored... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help

Auth userScope ?

2012-04-08 Thread heohni
Hi, I wonder why this is giving me this error public function beforeFilter() { parent::beforeFilter(); $this-Auth-authenticate = array( AuthComponent::ALL = array('userModel' = 'User'), 'scope' = array('User.usr_active' = '1') } returns me Authentication adapter scope was not found. But

Re: AutoLoginComponent Question

2012-04-08 Thread heohni
No, $config['AutoLogin'] = array( 'active' = true, and protected $_defaults = array( 'active' = true, Am Sonntag, 8. April 2012 11:07:29 UTC+2 schrieb heohni: Hi, I tried to setup this AutoLoginComponent Component from http://www.dereuromark.de/2012/02/02/more-persistent-sessions

Re: AutoLoginComponent Question

2012-04-08 Thread heohni
If I do a debug($this-settings); I get array( 'password' = '*', 'active' = true, 'model' = 'User', 'username' = 'username', 'plugin' = '', 'controller' = 'users', 'loginAction' = 'login', 'logoutAction' = 'logout',

Re: AutoLoginComponent Question

2012-04-08 Thread heohni
is all right ! = NOT so !true === false and it will only run into the skip if it would be true (and active would be false) here Am Sonntag, 8. April 2012 12:51:11 UTC+2 schrieb heohni: If I do a debug($this-settings); I get array( 'password' = '*', 'active' = true

Re: AutoLoginComponent Question

2012-04-08 Thread heohni
heohni: Because it runs still into the if , do the return; and the script stops at this point for me. That is my problem :-) This way the cookie will never be created. Am Sonntag, 8. April 2012 13:07:06 UTC+2 schrieb euromark: so where is your problem? looking at your debug statement

Re: AutoLoginComponent Question

2012-04-08 Thread heohni
well, I can see the checkbox, because of if (Configure::read('AutoLogin.active')) { echo $this-Form-input('auto_login', array('type'='checkbox', 'label'=__('Remember on this computer'))); } 'requirePrompt' = true // no changes made here But I belive that the point is the redirection part. I

Re: Session unstable?

2012-04-07 Thread heohni
finding out the problem? Thanks!! Am Freitag, 6. April 2012 22:11:09 UTC+2 schrieb heohni: Hi, I just build a kind of small shoppingcart and while testing it, I have the feeling that the session works unstable as sometimes I have products saved to my session then I click arround the pages

sending emails question

2012-04-07 Thread heohni
Hi, I having a newsletter registration where I want to send an email to the user and to the admin. For now I only send to user this way: // send email to user to confirm $email = new CakeEmail(); $email-helpers(array('Html', 'Text')); . $email-send(); How do I send another email to admin

Re: sending emails question

2012-04-07 Thread heohni
Because here: http://book.cakephp.org/2.0/en/core-utility-libraries/email.html#CakeEmail is no reset mentioned. Am Samstag, 7. April 2012 18:37:15 UTC+2 schrieb heohni: Hi, I having a newsletter registration where I want to send an email to the user and to the admin. For now I only send

run cake with mysql socket

2012-04-06 Thread heohni
Hi, on a managed Server I have this infomation: host: localhost:/tmp/mysql5.sock How do I setup my database.php to beeing able to connect to a socket? I am currently only getting error messages :-( -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: run cake with mysql socket

2012-04-06 Thread heohni
public $default = array( 'datasource' = 'Database/Mysql', 'persistent' = false, 'host' = 'localhost', 'unix_socket' = '/tmp/mysql5.sock', 'login' = 'xx', 'password' = 'xx', 'database' = 'xx', 'encoding' = 'utf8' ); -- Our newest site for the community: CakePHP Video Tutorials

Having trouble with cake installation

2012-04-06 Thread heohni
Hi, I have my cake project running at /root/dev/ The project is there and links are working, but I get this error: Helper class PropertyLinksHelper could not be found. Do I have to set somewhere a path? I have the same project on another server running, but directly inside root and I had no

Session unstable?

2012-04-06 Thread heohni
Hi, I just build a kind of small shoppingcart and while testing it, I have the feeling that the session works unstable as sometimes I have products saved to my session then I click arround the pages and when I return to my cart it's empty. Is it just me having such issues? Or is this maybe a

Re: Problem with loading xml data

2012-03-27 Thread heohni
Can I push this up? I still need your help, guys! Am Montag, 26. März 2012 09:34:44 UTC+2 schrieb heohni: Hi, within a helper class I would like to call this xml App::uses('Xml', 'Utility'); App::uses('AppHelper', 'View/Helper'); class SuggestHelper extends AppHelper { function suggest

Problem with loading xml data

2012-03-26 Thread heohni
Hi, within a helper class I would like to call this xml App::uses('Xml', 'Utility'); App::uses('AppHelper', 'View/Helper'); class SuggestHelper extends AppHelper { function suggest($keyword){ $keyword = urlencode(trim($keyword)); $xml = Xml::build($this-feed_url.$keyword); $parsed_xml

How can I render a template to grap the html from witihn a helper?

2012-03-26 Thread heohni
Hi, I would like to render a view to grap (for seo) the content to generate keywords. App::uses('AppHelper', 'View/Helper'); class MetaHelper extends AppHelper { function getMetas($template){ $content = $this-render($template); returns my this error: Method MetaHelper::render does

milesj ​cake-auto_login I can't get it working

2012-03-26 Thread heohni
Hi, I downloaded the version 3.4. I added the checkbox echo $this-Form-input('auto_login', array('label' = __('Stay'), 'value' = 1, 'type' = 'checkbox', 'div' = 'checkbox')); I added the component to my appController. But I use a ajax validation for my login popup and it looks like this:

Re: How can I render a template to grap the html from witihn a helper?

2012-03-26 Thread heohni
\trunk\y\View\Layouts\default.ctp* on line *36* function getMetas($template){ $inhalt = $this-_View-render($template); I added 'Meta' to the AppController helper array. Any ideas? Am Montag, 26. März 2012 10:51:40 UTC+2 schrieb heohni: Hi, I would like to render a view to grap (for seo

Using $this-Js in view file

2012-03-22 Thread heohni
Hi, I tried to use js this way: $this-Html-scriptStart(array('inline' = false)); echo $this-Js-alert('I am in the javascript'); $this-Html-scriptEnd(); echo $this-Js-writeBuffer(); But my page is empty and I don't get any output. There is also no javascript in source. I use already the

Strange validation issue

2012-03-20 Thread heohni
Hi, I have some strange (to me) problems with the validation of my contact form in Cake 2.1 This is my model ?php class Contact extends AppModel { var $name = 'Contact'; var $useTable = 'contacts'; var $primaryKey = 'con_id'; var $validate = array( 'con_firstname' = array( 'required' =

Re: Strange validation issue

2012-03-20 Thread heohni
I tried 'con_firstname' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyFirstName', 'last' = true) ), 'con_lastname' = array( 'required' = array('rule' = 'notEmpty', 'message' = 'EmptyLastName'), 'last' = true ), but both is not working. PS: Hi Mark, I am just about to get

How to find data from another model

2012-03-20 Thread heohni
Hi, within my contacts controller I would like to select some data from my model 'details' I added App::uses('Detail', 'Model'); to make it available and I can access some needed functions, but what I need is to do a $this-find()... on the details model. How exactly can I do this? How is

Re: How to find data from another model

2012-03-20 Thread heohni
Great! Thanks!! Am Dienstag, 20. März 2012 16:40:53 UTC+1 schrieb heohni: Hi, within my contacts controller I would like to select some data from my model 'details' I added App::uses('Detail', 'Model'); to make it available and I can access some needed functions, but what I need

Re: (Cake2.1) Read from RSS Feed and output in view

2012-03-15 Thread heohni
?php App::uses('Xml', 'Utility'); class RssController extends AppController{ var $feed_url = 'http://www..'; function index(){ $xml = Xml::build($this-feed_url); $parsed_xml = Set::reverse($xml); return $parsed_xml['rss']['channel']['item']; } } -- Our newest site

(Cake2.1) Read from RSS Feed and output in view

2012-03-14 Thread heohni
Hi, In the book i found only a tutorial to create RSS Feeds... Is there a chance to find something how to read from a existing RSS Feed and output the content within a view file? I am using cake 2.1. Thanks!! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org

How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi, I want to use such a association: var $hasMany = array( 'Comment' = array( 'className' = 'Comment', 'foreignKey' = 'user_id', 'conditions' = array('Comment.status' = '1'), ) ); can I somehow use my current session value for the condition? Like 'conditions' = array('UEB_FKID_SPR_ID' =

unlink error from FileEngine.php

2012-03-09 Thread heohni
Hi, from time to time I get this error message: *Warning*: unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [ function.unlink http://localhost/objekts/search/function.unlink]: Permission denied in * D:\SVN-Homes\PHP\trunk\cake2.1\lib\Cake\Cache\Engine\FileEngine.php* on line

Re: How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi, I tried this, but with no effect, no error messae, but the select returns all found data without the contain conditions. Please help me $results = ClassRegistry::init('Eigenschaftsarten')-find('all', array( 'contain' = array( 'Uebersetzungen' = array( 'fields' = 'UEB_TEXT,

Re: unlink error from FileEngine.php

2012-03-09 Thread heohni
I will try, thanks again! Am Freitag, 9. März 2012 16:21:16 UTC+1 schrieb heohni: Hi, from time to time I get this error message: *Warning*: unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [ function.unlink http://localhost/objekts/search/function.unlink

Re: How to use a session var inside $hasMany condition ?

2012-03-09 Thread heohni
Hi!, did you just read what my answer was? I tried, but the find statement simply ignores my condition with the contain. Do you know why or what I am doing wrong? Am Freitag, 9. März 2012 14:30:49 UTC+1 schrieb heohni: Hi, I want to use such a association: var $hasMany = array( 'Comment

Model is reading from the wrong table ??

2012-03-08 Thread heohni
Hi, I have this model 'Eigenschaftsarten' class Eigenschaftsarten extends AppModel { var $name = 'Eigenschaftsarten'; var $useTable = 'Eigenschaftsarten'; var $primaryKey = 'EIA_ID'; function getEIA_IDNames($array){ $return = $this-find('first', array( 'conditions' = array( '' ), 'fields' =

Is there no $this-referer() in cake 2.1 any more?

2012-03-08 Thread heohni
How can I get now the referer? In $this-request-params nothing? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this

Re: Model is reading from the wrong table ??

2012-03-08 Thread heohni
05h59min45s UTC-3, heohni escreveu: Hi, I have this model 'Eigenschaftsarten' class Eigenschaftsarten extends AppModel { var $name = 'Eigenschaftsarten'; var $useTable = 'Eigenschaftsarten'; var $primaryKey = 'EIA_ID'; function getEIA_IDNames($array){ $return = $this-find('first', array

How lo load a model from a model?

2012-03-06 Thread heohni
Hi, class DetailsController extends AppController{ var $name = 'Detail'; public function index($id){ if($id){ $results = $this-Detail-find('first', $conditions['Gesamtobjekt']); App::uses('Objekt', 'Model'); $results = $this-Objekt-translateStrings($results);debug($results); } } }

Re: How lo load a model from a model?

2012-03-06 Thread heohni
-translateStrings($results);debug($results); Jeremy Burns Class Outfit http://www.classoutfit.com On 6 Mar 2012, at 11:14:42, heohni wrote: Hi, class DetailsController extends AppController{ var $name = 'Detail'; public function index($id){ if($id){ $results = $this-Detail-find

Strange blank spaces in markup

2012-03-05 Thread heohni
Hi, I have a strange problem in 2 projects. One is using Cake 1.3 the other 2.1. I have in both projects strange blank spaces in my markup, which I can't find physically in my php code. Please check attachments. Did anyone had something before? What can I do? Those spaces do not appear, when

Ajax Pagination using elements - only each second link is using ajax function

2012-03-01 Thread heohni
Hi, this is my controller: public function search($searchSingleId = false, $singleId = null) { if ($this-request-is('ajax')) { $this-layout = false; } ..snip $this-set('results', $results); if ($this-request-is('ajax')) { $this-render('/Elements/paginate-results'); return; } } and this

Having issue with AUTH in 2.1

2012-02-28 Thread heohni
Hi, as I only have to secure one controller, I put this into my usersController: class UsersController extends AppController { var $name = 'User'; var $components = array('Auth'); public function beforeFilter() { parent::beforeFilter(); $this-Auth-fields =

Re: Having issue with AUTH in 2.1

2012-02-28 Thread heohni
I did this, see above? On 28 Feb., 09:36, @dariobarila dario.bar...@gmail.com wrote: Hello, try to configure the Auth fields on the same level of  $components = array('Auth'); On 28 Feb, 09:33, heohni heidi.anselstet...@consultingteam.de wrote: Hi, as I only have to secure one

Re: Having issue with AUTH in 2.1

2012-02-28 Thread heohni
Even that way give me the same strange sql error On 28 Feb., 10:33, luca capra luca.ca...@gmail.com wrote: Il 28/02/2012 09:55, heohni ha scritto: I did this, see above? On 28 Feb., 09:36, @dariobariladario.bar...@gmail.com  wrote: Hello, try to configure the Auth fields

Re: Having issue with AUTH in 2.1

2012-02-28 Thread heohni
well, if I do it like the book says, I get no sql error any more, but the if ($this-Auth-login()) fails without any comment. In this case, how can I get the sql statement debugged which is running? On 28 Feb., 10:33, luca capra luca.ca...@gmail.com wrote: Il 28/02/2012 09:55, heohni ha scritto

autocomplete

2012-02-28 Thread heohni
Hi, I having problem with an autocomplete function. I have a form with a search input. Via jquery I catch the submit function and do a $.post(); to my search controller/action which returns the found data to a view via $this-set(compact('data')); I used this-layout = 'ajax'; And here is my

Re: Having issue with AUTH in 2.1

2012-02-28 Thread heohni
I have debug 2. but it will not return a sql statement, it's an ajax based request anyway On 28 Feb., 14:02, Rodrigo Rodrigues Moyle rodrig...@gmail.com wrote: Set debug to 2 Em terça-feira, 28 de fevereiro de 2012 06h55min25s UTC-3, heohni escreveu: well, if I do it like the book

Form select how to build outgroups?

2012-02-27 Thread heohni
Hi, I would like to such a select: FORM SELECT NAME=auswahl OPTGROUP LABEL=Countries OPTION VALUE=0France/OPTION /OPTGROUP OPTGROUP LABEL=Cities OPTION VALUE=0Paris/OPTION /OPTGROUP OPTGROUP LABEL=Cars OPTION VALUE=0Peugeot/OPTION /OPTGROUP /SELECT /FORM But is there a chance to

Re: Form select how to build outgroups?

2012-02-27 Thread heohni
OK, but I work on a multilingual projekt and need the name of the outgroup translated, so I need to use __() function. I have my array ready, but right now the 'group key' is numeric key and I don't know how to replace this numeric key with a string (which I can translate) On 27 Feb., 14:17,

Re: How to wrap the active number link in a tags at Paginator Helper

2012-02-26 Thread heohni
I think you have to do it with jquery. You can identify the current link on class name 'current' ?php echo $this-Paginator-numbers(array('separator' = ' | ', 'tag'='li')); ? On 26 Feb., 04:39, reynie...@gmail.com reynie...@gmail.com wrote: Hi every: Because I'm using Bootstrap from Twitter and

cakeSession strange thing...

2012-02-26 Thread heohni
Hi, in one my models I declare var $deletedEia = array(); later on, I add data to the array $this-deletedEia[] = array_pop($array); then I do want to save it to a session: CakeSession::write('deletedEia', $this-deletedEia); Strange enough, on every load of this function, the first array

Re: cakeSession strange thing...

2012-02-26 Thread heohni
it makes no diff if I do it from model or from controller On 26 Feb., 18:53, Tilen Majerle tilen.maje...@gmail.com wrote: where you read data from session ? :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2012/2/26 heohni heidi.anselstet...@consultingteam.de Hi, in one my

Re: cakeSession strange thing...

2012-02-26 Thread heohni
from session first, then add new value and all save again back to session...understand ? :) -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2012/2/26 heohni heidi.anselstet...@consultingteam.de it makes no diff if I do it from model or from controller On 26 Feb., 18:53, Tilen Majerle

Re: Form input selected

2012-02-25 Thread heohni
in the controller passing it on to the view via $this-request-data thats a cleaner approach than using the form here for the selected value On 24 Feb., 20:51, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I am using the ajax pagination and my url looks like this: /search/cat:12

find list = distinct?

2012-02-24 Thread heohni
Hi, I have this query: $results = $this-find('list', array( 'conditions' = array('1 = 1'), 'fields' = 'REG_ID, REG_NAME', 'order' = array('REG_NAME ASC') )); and I do a echo $this-Form-input('city', 'options' = $getCities, 'id' = 'city')); to get a

Ajax Pagination busy-indicator will not fadeout

2012-02-24 Thread heohni
Hi, Is there anybody who know what I have to do hide the busy-indicator after the results are updated? On page load the gif is hidden, it fades in on the first ajax call. $this-Paginator-options(array( 'update' = '#searchResults', 'evalScripts' = true, 'before' =

  1   2   3   >