Forum

The class URI must be provided in the id parameter

I created a new instance in AWS cloud with an image created out of an existing working instance. on the new instance now when I try to create a new Item class it throws an error 'The class URI must be provided in the id parameter' . can anyone throw some light on what I am doing wrong here. I am using TAO 3.2

Comments

  • RAL,

    Check and make sure the apache and generis.conf.php files are correct for your new location.

    Thanks,

    Amy

  • Hi Amy, I believe they are right as I compared them with the instance that is working, specifically the local namespace and ROOT URL.can you be little more specific if possible?

  • Is the ROOT_URL pointing to the current machine or the one that was working? You may also need to set debug in that file so that you can get a more detailed error message.

    Thanks,

    Amy

  • I have the root url pointing to 'my domain/taoplatform' and the domain is properly directing to my instance root which is where taopltform is installed. debug mode is currently false. I can set it true, but can you please guide me on the error file. I can attach that as well. apologies for the novice questions and thank you for your response and support

  • RAL,

    Please set it to debug and see if there's anything that stands out.

    Thanks,

    Amy

  • I did set the debug mode to true; I did not see any difference on the front end. appreciate if you let me know which specific file I should look at. I will keep exploring myself too.

  • Look in your data/tao/log/ directory.

  • that directory I am seeing is empty. it does not have anything neither the files nor any subdirectories

  • RALRAL
    edited April 2019

    however, I found error.log in /var/log/apache2 and it shows the below

    [Fri Apr 26 19:06:06.796862 2019] [:error] [pid 27416] [client 172.31.9.26:38962] PHP Fatal error: Uncaught Error: Call to a member function getUri() on null in /var/www/taoplatform/tao/actions/form/class.Clazz.php:222\nStack trace:\n#0 /var/www/taoplatform/tao/helpers/form/class.FormContainer.php(100): tao_actions_form_Clazz->initElements()\n#1 /var/www/taoplatform/tao/actions/form/class.Clazz.php(62): tao_helpers_form_FormContainer->__construct(Array)\n#2 /var/www/taoplatform/tao/actions/class.PropertiesAuthoring.php(299): tao_actions_form_Clazz->__construct(Object(core_kernel_classes_Class), Array, Array, 'simple')\n#3 /var/www/taoplatform/tao/actions/class.RdfController.php(160): tao_actions_PropertiesAuthoring->getClassForm(Object(core_kernel_classes_Class))\n#4 /var/www/taoplatform/taoItems/actions/class.Items.php(229): tao_actions_RdfController->getClassForm(Object(core_kernel_classes_Class), Object(core_kernel_classes_Class))\n#5 [internal function]: taoItems_actions_Items->editItemClass()\n#6 /var/www/taoplatform/tao/models/classes/routing/ActionEnforcer.php(145): call_user_func_array(Array, Array)\n#7 /va in /var/www/taoplatform/tao/actions/form/class.Clazz.php on line 222, referer: https:mydomain(replaced)/taoplatform/tao/Main/index?structure=items&ext=taoItems&section=manage_items

    not sure if it helps identifying the issue.

    Thanks a lot, Amy!

  • is upgrade an easy and straight forward one. I have so much of content and I am a little scared doing it now. is upgrade the only option for the issue I am facing

  • Unfortunately we do not have the upgrade path finalized as 3.3 is not in a final release state yet. However, there are a lot of bug fixes in it.

    Thanks,

    Amy

  • edited October 2019

    I have installed the latest version 3.3 on Ubuntu 18.04.

    Under Items when I click on create a class, it doesnt' let me write the name. The text box is disabled. When I click on manage schema, it throws the same errors.

    Call to a member function getUri() on null in /var/www/taoplatform/tao/actions/form/class.Clazz.php

    Call to a member function getUri() on null in /var/www/taoplatform/tao/actions/form/class.Clazz.php:216\nStack trace:\n#0 /var/www/taoplatform/tao/helpers/form/class.FormContainer.php(100): tao_actions_form_Clazz->initElements()\n#1 /var/www/taoplatform/tao/actions/form/class.Clazz.php(65): tao_helpers_form_FormContainer->__construct(Array)\n#2 /var/www/taoplatform/tao/actions/class.PropertiesAuthoring.php(316): tao_actions_form_Clazz->__construct(Object(core_kernel_classes_Class), Array, Array, 'simple')\n#3 /var/www/taoplatform/tao/actions/class.RdfController.php(163): tao_actions_PropertiesAuthoring->getClassForm(Object(core_kernel_classes_Class))\n#4 /var/www/taoplatform/taoItems/actions/class.Items.php(234): tao_actions_RdfController->getClassForm(Object(core_kernel_classes_Class), Object(core_kernel_classes_Class))\n#5 [internal function]: taoItems_actions_Items->editItemClass()\n#6 /var/www/taoplatform/tao/models/classes/routing/ActionEnforcer.php(160): call_user_func_array(Array, Array)\n#7 /va in /var/www/taoplatform/tao/actions/form/class.Clazz.

    The virtual host files, domain, IP and SSL are configured correctly under /etc/apache2/sites-available/.

    All the rest of the pages and menus look fine though.

    Thanks.

  • I am unable to duplicate this issue on Ubuntu 18.04 and the Tao 3.3-rc02 release. Can you confirm your PHP version and that all steps in https://adminguide.taotesting.com/3.3/installation-and-upgrade/ubuntu-and-debian were followed taking into account different location, etc.

  • I'm having the same issue. Did you find a solution?

  • Putting this here for future searchers:

    I found the issue. If your URL changes in any way you will run into a number of problems. I did not migrate my server but changed from http to https. The problem is the old URL is written a number of locations and unfortunately the instructions at https://hub.taotesting.com/articles/server-migration/server-migration-tao-30 are insufficient.

    In addition to changing config/generis.conf.php

    define('ROOT_URL','http://www.newTaoDomain.com/');

    You also need to change
    /config/generis/uriProvider.conf.php:20: 'namespace' => 'http://www.newdomain/taoapp.rdf#'

    Then you need to go into the database and find where the URL is also written there.

    I found the old URL at:
    mysql> select * from models limit 200;

    So update any records there that have your old URL

    Once I did that the errors "the class URI must be provided in the id parameter" went away.

  • Thanks for the additional information. I experienced similar problem migrating to https. I did the change also in the database. I am still having problem.

  • Did you change the file /config/generis/uriProvider.conf.php ?

  • Yes, I did the change in uriProvider.conf.php as well, but still getting the error.

  • Check which rdf is being called in access_log and update the files and database above to match that. That's how i solved this same issue. In my case it was first.rdf. I don't know why... by the way anyone know how to change this?
    Also in database on models table i have several references to http://www.tao.lu/Ontologies/... shouldn't this also be local? Could you please check if you have the same on yours installation?

    Thanks

  • update models set modeluri = REPLACE(modeluri, 'http://','https://') where modeluri like 'http://example.com%';

    update statements set subject = REPLACE(subject,'http://','https://') where subject like 'http://example.com%';

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy

×