Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - mculibrk

1
Issues / Re: PHPRAD 2.7.3 Publish won't "create" any changes / don't work
Thanks....

Yeah, I "learned" that the COPY pages "often produces" strange "consequences"... but it's so useful... not to repeat the configuring and "tuning" over and over again...

For multi-tab/wizzard forms especially... as you have to have pages for each tab/step and one "commit" page with the same "validations" etc...

...but I now setup a "make new version on each save" stuff so I'll be able to "step back" when "strange" happens again... ;)

There is no "plan/possibility" to get the format of the PPM file? It would be so helpful to be able to "fix/check" some part of a file when "strange" strikes...

Best regards
2
Issues / PHPRAD 2.7.3 Publish won't "create" any changes / don't work
After working for some time on a project I noticed the the changes are not getting "applied/exported" to published files any more. Then doing some change, revert, select "custom" (page design) and then back to "generated" worked for a few times but after some time I cannot gen any change to be "published".
The changes are still nicely visible in the designer/editor but nothing is getting "exported" when I hit publish. Event the list which states what's "published" does not change regardless of the actual changed pages i the project.
Then I also noticed a sudden PPM file change from a few hundred KB to 48000KB and then later on to 98000KB.

I think the issues are somehow related to copy/paste of pages in the designer (multiple copy of edit, add pages to new ones, then deleting some etc). Once I even got an "exception" error and still have a "reference" to an nonexistent page in one "mater-detail" configuration... and each time I click that the exception pops up...
 
Basically.. I'm stuck and I cannot "publish/export/produce" any more changes in the project.

What can be done to "repair/rebuild/check" the PPM file? Sure enough... backups are not really there (well.. there are, but old ones).

Is there any "PPM format" specification to maybe check manually the file?

Please, any help is greatly appreciated.

PS. I have purchased a license if that make any difference...

Regards,
MCulibrk
3
General Discussion / Forum captcha...
...is getting me mad.

Usually I need around 3 attempts to "guess" the captcha code.

Am I the only one "blind" and suffering this frustration while posting on this forum?

Regards
4
Questions / Re: Live data - how to in PHPRAD
Yeah... I thought so...

Anyway... I thought to make another page of the adequate type (list probably) and use it to generate pure JSON output. From the "normal" page then use some JS code to pull that JSON data and use it to update various "live" fields on the page.

What do you thing of this approach? Any better suggestion? (websockets on the page and keep the connection live? What is the status of websockets in PHPRAD?)

The only issue at the moment could be the pagination and filtering data which should be "passed" from the main/normal page...
Or make a lot of custom field formats (on dynamic fields) to add unique id= on each field to be able to update them directly by JS, then I could ignore the pagination altogether... (but this way there will be a lot of overhead/data going back and forth - ids to server, results back)

Any idea on how to effectively "link/shadow" a "sub page" of a normal list/view page to reflect the filtering/sorting... settings of the "parent" page? (basically to be sure the subpage "shows" the identical data (order etc))?

Thanks a lot!
5
Questions / Re: Setting table ROW class - possible?
@willvin Thanks for the quick response!

Yes... I know the custom thing... but the issue is in the "autogeneration" after that.
If I set "custom" I have to manually fix the page after any edit in GUI... or use "auto" and make changes every time I change something in the GUI...

Workable... but PITA..

The header attribute works great but just for the header row... no way to set the column class/attributes/styles in a "manageable" way...

Maybe a suggestion for next releases?

Thanks!
6
Questions / Setting table ROW class - possible?
Is there a way to set a table row element class?
I know there is the "fieldClass" option in the PHPRad designer... but that applies ONLY to the table HEADER.

The fields "custom code" part gets inserted after the column class declaration:
Code: [Select]
<td class="td-field">  [custom code] </td>

how to set/change/modify the mentioned "td-field" class? The <td> has no ID set...

Ideas?

What I want to accomplish is to add some custom "action buttons" in each row of the table.
That's working with the "custom code" part but I'm having troubles with the "styling" of the field which I cannot make identical/similar to the standard buttons.

Regards
7
Questions / Live data - how to in PHPRAD
Hi there!

Maybe a dumb question but... how could a "live data view" could be done in PHPRAD in some more elegant way than just reloading the entire page?
Is there something that is actually "supported" by default in the PHPRAD concept?

In the end... maybe a kind of "page in page" and then refreshing/reloading just the subpage?

Or some kind of AJAX "API/subpage" call to get the changes and updating the nodes on page?

For example in a List page you have something (a list...) where values of some records changes few times a second and want to "live view" that on the page?

Suggestions?

10
Issues / Re: Role Based Access Control Error Executing Query Modifying Roles Table Key Column
Hi!

This is the (almost) same message I get when enabling dynamic roles - I posted the question/issue in another post.

When you enable the dynamic role PHPRAD always wants to modify the table structure even if its already prepared as it should be, and it is doing it in a strange way so the generated query results in an error and nothing gets changed/saved to the DB and the role thing does not get activated.

With the 2.7.3 version its happening always, on a new/blank database, just try to enable dynamic roles. I tried a few different "ways" of activating it (create tables, with fields, without fields...) but the end result is always the same - invalid query and the roles does not work (at least for me).
12
Bugs / Re: AccountController - BUG - on duplicate field names

Another "BUG" I noticed, not related to this exact issuse:

After enabling "authentication" on a sample project the "publish" action got broke somehow.
Some of the generated files were just half "compiled" - there was a lot of "placeholders" left in them ("___something") and sure, the the page/app stopped working.

It's interesting that the only thing I did was to enable authentication (selected an exitsing table and fields).
After that I created a table from PHPRAD and used that for auth and it was OK - the code generated and the app worked.

The same goes for the "role management" - when I select "dynamic" and select tables it breaks with some strange errors that it cannot create/modify table fields - but the tables and fields were already created (with same types as it tried to change to)

PHPRad is great, really... but is sometimes extremely "fragile" for no obvious reasons...

regards
13
Questions / Re: Custom (inline) actions in View pages
Ok, thanks...

Would be an option to add some sort of "placeholders" in your templating system (for generating code and all the rest)  in the form of "___userCustomCode" and then if it's defined just include/expand it in the code/model/view generation process?

That's not a big "deal" (I suppose) and could solve quite some customization.

That would allow to add custom methods to controllers/models etc...

Regards
14
Bugs / AccountController - BUG - on duplicate field names
There is a bug in PHPRAD v2.7.3 on the default controller generated for authentication.

The error is the Index method in the "where" clause.

The authentication table is called "accounts" and the primary key is on the field named ID.

The problem is when adding other tables to the list/view/edit pages - in this case a "groups" table - which has same field name "ID".

(mybe it's bad practice but use the same field name on all tables "ID" as primary key with autoincrement)

The problem is in the $db->where() invocation where only the field name is used instead of table.field as in all methods (edit) where thw table name is properly used.


original code:
Code: [Select]
/**
 * Account Page Controller
 * @category  Controller
 */
class AccountController extends SecureController{
function __construct(){
parent::__construct();
$this->tablename = "accounts";
}
/**
* Index Action
* @return null
*/
function index(){
$db = $this->GetModel();
$rec_id = $this->rec_id = USER_ID; //get current user id from session

$db->where ("ID", $rec_id);

$tablename = $this->tablename;
$fields = array("accounts.ID",
"accounts.userName",
"accounts.fullName",
"accounts.email",
"groups.name AS groups_name",
"accounts.photo",
"accounts.simpleRole");
$db->join("groups", "accounts.groupID = groups.ID", "LEFT ");
$user = $db->getOne($tablename , $fields);
                ....

     * Update user account record with formdata
* @param $formdata array() from $_POST
     * @return array
     */
function edit($formdata = null){
$request = $this->request;
$db = $this->GetModel();
$rec_id = $this->rec_id = USER_ID;
$tablename = $this->tablename;
//editable fields
$fields = $this->fields = array("ID","userName","groupID","fullName","email","password","photo","simpleRole");
if($formdata){
$postdata = $this->format_request_data($formdata);
                        ........
}

$db->where("accounts.ID", $rec_id);;

$data = $db->getOne($tablename, $fields);
$page_title = $this->view->page_title = get_lang('my_account');
if(!$data){
$this->set_page_error();
}
return $this->render_view("account/edit.php", $data);
}

15
Questions / Re: Custom (inline) actions in View pages
Hi!
Thanks for your quick response!

Well... I would like to add some more actions to table rows besides the auto generated View/Edit/Delete.

For example, I would like to add a "Commit" which would execute/call some PHP code.
But I would really like that new entry/action to be listed with other actions available on the record.

I know I can switch to "custom" design... but then I have to do all manually... and changing something is a real pain. If i switch from Custom view to "auto generated" all my changes are lost...

The same goes for changing the code in Controller modules.
I know I can disable the "autogeneration"... but then any changes made in the RAD GUI will not be applied in the code...

Do you have any suggestion on how to "fix" this behaviour? To be able to use the RAD GUI + custom changes in Controller (or other) php modules?

Best regards