# |
Feb 11th 2018, 09:04 |
marcin2828 |
so I moved logic to cells (which was correct move in my particular case as forms build by cell's views are re-used on good few pages) |
# |
Feb 11th 2018, 09:03 |
marcin2828 |
For an example two organisations wants to manage same part of the system differently - I want to avoid creating plugins for small bits like that ... |
# |
Feb 11th 2018, 09:01 |
saeideng |
why? |
# |
Feb 11th 2018, 08:59 |
marcin2828 |
Hello everyone, I have a question about cells : Is there any way to alias cells? |
# |
Feb 11th 2018, 08:53 |
K4T |
ok, I think now I got it... well... (facepalm) |
# |
Feb 11th 2018, 08:48 |
K4T |
yeah, I read it few times, I probably do not understand something here as I am not interested in creating new collection. I want to modify items within existing collection. That is why I choosed each. Anyway thank you for help, I will use map now. |
# |
Feb 11th 2018, 08:36 |
saeideng |
The map() method will create a new collection based on the output of the callback being applied to each object in the original collection: |
# |
Feb 11th 2018, 08:36 |
saeideng |
The each() method will not create a new collection, but will allow you to modify any objects within the collection: |
# |
Feb 11th 2018, 08:31 |
K4T |
admad could you explain why each is not working? According to doc: "but will allow you to modify any objects within the collection:" |
# |
Feb 11th 2018, 08:24 |
admad |
K4T: use map() instead of each() |
# |
Feb 11th 2018, 08:14 |
K4T |
any ideas, please? |
# |
Feb 11th 2018, 08:14 |
K4T |
Hello, in CakePHP 3.5 I have collection made from array. I am trying to use ->each method to unset some fields from each collection item. Unfortunatelly it looks like each is not modifing collection itself like it is mentioned in documentation. Here is the code: https://gist.github.com/K4T/8c0d271c9f6ee0bc030c90a6418a4d43 |
# |
Feb 11th 2018, 07:45 |
ricksaccous |
not sure that will 100% work because you still might get the table not found error with that |
# |
Feb 11th 2018, 07:44 |
ricksaccous |
then try to do echo $this->Modelname->hamburger; |
# |
Feb 11th 2018, 07:43 |
ricksaccous |
{ public $hamburger = "Loaded"; } |
# |
Feb 11th 2018, 07:43 |
ricksaccous |
i guess create a property in the class like |
# |
Feb 11th 2018, 07:37 |
sujay |
is there any ways to test if its properly loaded? |
# |
Feb 11th 2018, 07:37 |
sujay |
the model is loaded |
# |
Feb 11th 2018, 07:37 |
sujay |
its 2.x, and i'm using the same copy as on the servers |
# |
Feb 11th 2018, 07:34 |
ricksaccous |
are you completely sure you are using same version of cake on test and production server? |
# |
Feb 11th 2018, 07:33 |
ricksaccous |
are you sure the model is loading? |
# |
Feb 11th 2018, 07:33 |
ricksaccous |
are you using cakephp3? |
# |
Feb 11th 2018, 07:33 |
sujay |
would it be related to any naming or somethings? |
# |
Feb 11th 2018, 07:32 |
sujay |
same issue |
# |
Feb 11th 2018, 07:32 |
sujay |
tried changing name of the table |
# |
Feb 11th 2018, 07:32 |
sujay |
i checked the models also |
# |
Feb 11th 2018, 07:31 |
ricksaccous |
oh... |
# |
Feb 11th 2018, 07:31 |
sujay |
mysql |
# |
Feb 11th 2018, 07:30 |
ricksaccous |
what db engine are you using? |
# |
Feb 11th 2018, 07:30 |
ricksaccous |
sounds like a server issue then |
# |
Feb 11th 2018, 07:30 |
sujay |
:sleepy: |
# |
Feb 11th 2018, 07:30 |
sujay |
test server it works fine |
# |
Feb 11th 2018, 07:30 |
ricksaccous |
probably, lol |
# |
Feb 11th 2018, 07:29 |
ricksaccous |
can a db table even have a period in the name? |
# |
Feb 11th 2018, 07:29 |
sujay |
the issue only seems to have in production server |
# |
Feb 11th 2018, 07:29 |
sujay |
the table exists |
# |
Feb 11th 2018, 07:29 |
sujay |
ive checked in db |
# |
Feb 11th 2018, 07:29 |
ricksaccous |
the table doesn't exist? |
# |
Feb 11th 2018, 07:28 |
sujay |
any idea why it throws following error ? 2018-02-11 12:30:06 Error: [PDOException] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'owbrovnb_owbro.Wsearchana' doesn't exist |
# |
Feb 11th 2018, 06:38 |
ricksaccous |
the encrypted passwords should be the same |
# |
Feb 11th 2018, 06:37 |
ricksaccous |
you encrypt the password the user types in the same way then compare them |