QDrupal and InnoDB Relationships

Login or register to post comments
6 replies [Last post]
Offline
Joined: 08/14/2009

First of all, I am new to Drupal and QDrupal, but have used Qcodo very successfully in the past, so many thanks to those that created this module and QCubed. I am trying to determine if Drupal will be a viable solution for us to use for custom web applications and was very excited to see QDrupal.

However, in the process of writing my first custom module for Drupal and utilizing QDrupal I ran into some issues. I have enabled OG (organic groups) and several related modules to set up teams. So, when I ran the Code Generator I was disappointed to see all of the Drupal tables with no relationships defined. Maybe Drupal doesn't allow this?!?

Still no big deal, right? Well, for the og table, I go to set up the relationship to link nid to the node table and it is defined as int(11), while nid in the node table is defined as int(10) unsigned. So, I change the definition of nid in the og table and set up the relationship, run the Code Generator and I'm off and running and happy. I'd rather not have to do this for each module I want to use, but if that would make it work, I would be okay with it. Unfortunately, a little while later, I discover that my calendar and groups pages are broken, even though I can now successfully use QCubed to do what I want with my custom module.

Surely this has come up with experienced QDrupal users before. Am I doing something wrong or missing something obvious? Should I fill out a bug report for the OG module? Can anyone give me some insight on how to overcome this issue. If I can't take advantage of the built in strengths of QCubed, it makes me wonder if Drupal will work as a platform for web applications.

Thanks in advance for the help.

MikeHostetler's picture
Offline
Joined: 01/09/2008

David-

Very excited to see you interested in QDrupal!

We've been using it extensively at A Mountain Top. However, we don't use it to code-gen against drupal tables. We're often tasked with building a module that requires a hierarchical data structure, which is where QDrupal comes in handy.

The group that takes advantage of QDrupal right now is pretty small, and there's not much documentation. Feel free to ping me directly if you have any questions or problems.

Mike

Offline
Joined: 08/14/2009

Mike,

Thanks so much for the response. I am still very excited about what I believe QDrupal can provide for us, but we are still working through some issues.

We have run into to several warnings and notices, such as "A session had already been started - ignoring session_start()". So, in the prepend.inc.php file, I have made the following change around line 88:

  // set_error_handler('QcodoHandleError');
  set_error_handler(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR); // SET TO ONLY ERRORS!!!

However, this results in the following warning on some pages:

warning: set_error_handler() expects the argument (81) to be a valid callback in C:\wamp\www\gatewaypeople.com\gatewaypeople\sites\all\modules\qdrupal\qcubed\wwwroot\includes\prepend.inc.php on line 89.

It also prevents some pages from loading at all. Some pages seem to see this as a warning and others see it as an error. Can you shed any light on what setting we can use here to allow all pages to load properly (and ideally without the warning)?

Thanks again,
David

MikeHostetler's picture
Offline
Joined: 01/09/2008

Are you sure you copied in the qcubed_overrides folder? It had the code patches that should take care of all of those errors.

Offline
Joined: 08/14/2009

Hmmm.... I did copy the qcubed_overrides folder into sites\all\modules\qdrupal\qcubed (i.e. the root of my qcubed installation). Is that the correct location?

Also, I ended up completely commenting out the set_error_handler('QcodoHandleError'); line and it has "resolved" the issue I was having... of course this is not an ideal solution.

Thanks again for the help.

MikeHostetler's picture
Offline
Joined: 01/09/2008

David-

That's the correct place to put it. It's probably a good idea to just double check that the files got copied correctly. I've seen it where that folder gets copied into the qcubed folder, rather then "on top" of the qcubed folder.

If that doesn't work, feel free to hit me up via my personal contact form and we can debug it together.

Offline
Joined: 08/14/2009

Thanks again Mike. I'll try that and see if it works, which would be much better than my current workaround.