solved Broken "Create" Page

PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
I have cloned the page creator module so that the new module will specifically keep track of archaeological records, everything looks good but my create page doesn't work, can anyone see the error in my create code?

//------------------------------
// create
//------------------------------
function view_atArcheology_create($_post, $_user, $_conf)
{ // Must be logged in to create a record jrUser_session_require_login(); jrUser_check_quota_access('atArcheology'); // Bring in language jrUser_load_lang_strings(); $_lang = jrCore_get_flag('jr_lang'); // Start our create form jrCore_archeology_banner(1); // Form init $_tmp = array( 'submit_value' => 2, 'cancel' => jrCore_is_profile_referrer() ); jrCore_form_create($_tmp); // Archeology Title $_tmp = array( 'name' => 'archeology_title', 'label' => 3, 'help' => 4, 'type' => 'text', 'validate' => 'not_empty', 'required' => true ); jrCore_form_field_create($_tmp); // Archeology Location (profile or main site) // NOTE: master admin only $_opt = array( 0 => $_lang['atArcheology'][15], 1 => $_lang['atArcheology'][16] ); $_tmp = array( 'name' => 'archeology_location', 'group' => 'master', 'label' => 13, 'help' => 14, 'type' => 'select', 'options' => $_opt, 'default' => 1, 'validate' => 'number_nn', 'min' => 0, 'max' => 1, 'required' => false ); jrCore_form_field_create($_tmp); // Archeology Body $_tmp = array( 'name' => 'archeology_body', 'label' => 5, 'help' => 6, 'type' => 'editor', 'validate' => 'allowed_html', 'required' => true ); jrCore_form_field_create($_tmp); // Include Header $_tmp = array( 'name' => 'archeology_header', 'label' => 22, 'help' => 23, 'type' => 'checkbox', 'default' => 'on', 'validate' => 'onoff', 'required' => true ); jrCore_form_field_create($_tmp); // Item Features $_tmp = array( 'name' => 'archeology_features', 'label' => 24, 'help' => 25, 'type' => 'checkbox', 'default' => 'on', 'validate' => 'onoff', 'required' => true ); jrCore_form_field_create($_tmp); // Display record with form in it jrCore_archeology_display(); }


Thanks for the help :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 10/26/16 08:11:20AM
michael
@michael
8 years ago
7,715 posts
jrCore_archeology_display(); is not a function.

--edit--
use PhpStorm and it would tell you this.
updated by @michael: 07/20/16 03:50:44PM
paul
@paul
8 years ago
4,326 posts
So what is happening? Any errors show? Anything in the logs?


--
Paul Asher - JR Developer and System Import Specialist
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
I get a 500 error


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
and these showed up

[20-Jul-2016 15:50:49 America/Tegucigalpa] PHP Fatal error: Call to undefined function jrCore_archeology_banner() in /public_html/modules/atArcheology/index.php on line 177 [6]

[20-Jul-2016 16:15:49 America/Tegucigalpa] PHP Fatal error: Call to undefined function jrcore_archeology_include_admin_menu() in /public_html/modules/atArcheology/index.php on line 97 [1]


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
LOL!! Hey Paul apparently there are a lot of "page" references that needed to remain "page" and not be changed to archeology. pagebreak, pager, jrCore_page_banner, jrCore_page_display

I will continue to check around but at least the "create" is working now. :)

Thanks guys!!


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 07/20/16 05:16:54PM
paul
@paul
8 years ago
4,326 posts
Sorry - The instructions I gave you in your support ticket on how to clone a module were taken far too literally. When I said 'change all instances of 'page' to 'archeology' that only refers to instances that refer to the module url and its datastore fields, and not external function calls etc.
To clone a module this way you really need to understand how Jamroom modules work so that every instance of this key word can be looked at and the decision made if it needs changing, and not just a blanket change of all instances.


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 07/21/16 12:03:54AM
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Everything is working out great now! Thanks :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

Tags