#927 Re: Bug Reports » Multiple Many to Many fields don't like the edit page » February 11, 2013 10:49pm

I'm probably being confusing by saying "tagged". I'm not really sure what the proper terminology for the action is when adding a relationship in a many to many wink

What I mean is this: If you have two categories you can relate to an event and you relate both of them the next time you load up the edit screen for that event the category many-to-many will fail to load. I can replicate that behavior with one or two many to many fields.
If there are two categories / locations available and I relate one of each to the event they seem to work properly. If a single relationship in each of the many to many's doesn't work I'm not sure what's going on (maybe you can create us an admin user or something and we can look into it some more on your installation).
Thanks for the kind words about BigTree!

#928 Re: Bug Reports » Multiple Many to Many fields don't like the edit page » February 11, 2013 8:31pm

Dan,

I think this may be related to a bug that Ben found today, but if this isn't the case let me know -- if you've tagged everything possible to a Many to Many then the whole many to many disappears when you try to edit the item the next time around. This is due to the (ideal) behavior of the tagger not showing up if there's nothing available to tag. It's on our list for an RC3 fix that will hopefully roll out around the beginning of March.

As far as One to Many, that's actually a field type Ben whipped up earlier today — hopefully he can respond here. He can probably export it and post it for anyone to have. I'm not sure if we're going to make it a core field type in the future or not but it's a possibility in 4.1 (we're feature frozen now for 4.0).

#929 Re: Developer Help » Full path to uploads not being stored in the database » January 29, 2013 5:25pm

This is now fixed in the development branch on GitHub: https://github.com/bigtreecms/BigTree-CMS

I'm not sure when RC3 will be released, but this fix will be included there as well. Thanks for the bug report!

#930 Re: Developer Help » Full path to uploads not being stored in the database » January 29, 2013 4:40pm

It looks like there is a bug with photo gallery processing as a Setting. I'll be sure to get this fixed shortly and released with the RC3 update.

#931 Re: Developer Help » BigTree Admin Bar off by default? » January 28, 2013 10:04am

If your templates are completely empty the BigTree bar won't show up. You'll need the standard <html><body></body></html> at the very least since BigTree attaches the bar's JavaScript by looking for the closing </body> tag and prepending it.

#932 Re: Developer Help » BigTree Admin Bar off by default? » January 27, 2013 11:22pm

The admin bar should show up on the front end of the site when you are logged into the admin area. Is it not working for you?

#933 Developer Help » BigTree 4.0RC2 Backwards Compatibility Notes » January 22, 2013 6:27pm

timbuckingham
Replies: 0

BigTree 4.0RC2 introduces some issues regarding a few specific behaviors and custom PHP modules in the admin. First, the bigger issue of custom PHP modules in the admin:

BigTree's admin now has a more thorough default.php layout from which it draws most of the admin. This includes related modules, H1s, breadcrumbs, and navigation. You no longer need to draw these elements yourself so if you were previously drawing them you will need to modify your module to no longer do so (or use your own custom layout file that replicates the old behavior, just don't replace default.php or the rest of the admin will no longer draw it). In addition, the "form_container" class has been renamed "container" to more accurately describe its functionality. You will want to update any custom pages that use that class.

Miscellaneous Changes

  • BigTree now defaults to use MySQLi PHP extension instead of the deprecated MySQL extension. In relation to this, anywhere you were previously using mysql_real_escape_string you may want to switch to using the new shorthand sqlescape function which will use whichever extension is available.

  • sqlfetch() no longer throws an Exception if debug is turned off.

  • Tagging is now associated by table instead of by module. BigTree's update scripts should update this automatically from older versions but if you were using custom functions related to bigtree_tags_rel you may need to update them.

  • Many to Many field type's list parser function now parses both the list of available items as well as the list of currently tagged items. The list of available items is given true as its second parameter when parsing. The list of current items receives false as its second parameter when parsing.

  • Including custom CSS and JavaScript in the admin is now done through $bigtree["css"] and $bigtree["js"] instead of $css and $js.

  • More semantic paging for BigTreeModule::getPage and other page-related functions: The first page is now page 1 instead of page 0.

#934 Re: Developer Help » Translated content » December 16, 2012 3:32pm

Right now the timeline is internal to get the most stable 4.0 release we can -- we're going to be publishing release schedules and feature expectations when 4.0 goes live.  GitHub is definitely the best place for any bugs you find, thanks!

#935 Re: Developer Help » Translated content » December 16, 2012 3:15pm

We're working on getting together a system for submitting and listing extensions for the official 4.0 release (which should be first quarter 2013). We'll be starting it off with a few of the common ones that we've used with our own clients and begin accepting third party extensions after that. Adding in the language extension class to that section is a great idea!

#936 Re: Developer Help » Translated content » December 16, 2012 2:59pm

I think to accomplish what you're asking with the URL scheme you'd need to create a custom router.php in in /custom/.

You'd also want to override a few functions in the BigTreeCMS class so that when getLink or getNavByParent is called it throws the /en/ or /es/ into your URLs.

RC2 is modifying the router.php file quite a bit to simplify and enhance routed templates so I'll have to let you know where to modify that when it rolls out. Basically, you'd want to add something like:

if ($bigtree["path"][0] == "es") {
    define("USER_LANGUAGE","es");
    $bigtree["path"] = array_slice($bigtree["path"],1);
} else {
    define("USER_LANGUAGE","en");
}

That would make the routing work properly when it starts with /es/. You'd probably need to put it in the line that precedes the $cms->getNavId call (I'm not sure what line it's on in RC1, but I think it's only called once).

For extending the BigTreeCMS class to properly get your /es/ links when your user's language is currently spanish you'd want to do the following:

  • Create a class in /custom/inc/required/ that extends BigTreeCMS

  • Edit your /templates/config.php file to define "BIGTREE_CUSTOM_BASE_CLASS" to the name of the class you created (it should be set to false in the default config, switching it to your custom class will make the default $cms variable an instance of your custom class instead of BigTreeCMS).

It looks like the following functions would need to be extended:

  • drawXMLSitemap (if you want /es/sitemap.xml to show a separate sitemap of /es/ links)

  • getBreadcrumbByPage

  • getInternalPageLink

  • getLink

  • getNavByParent

They would mostly need to be changed to draw "es/" after WWW_ROOT when returning links if USER_LANGUAGE was set to "es". I'd be happy to write the extension class if you're interested. This is something that's come up a few times so we may be adding it as a core feature in the 4.1 release.

#937 Re: General » Previews not working » December 15, 2012 1:07pm

It looks like there's a bug with previewing the homepage -- I'll be sure to have it fixed in the next release candidate (planned for release December 21!).


Let me know if you need anymore help -- happy to look into any issues!

#938 Re: Developer Help » Google Analytics » November 28, 2012 11:23am

That's awesome! Glad to see it's working well for you!

#939 Re: Developer Help » Google Analytics » November 27, 2012 11:53am

It's been a long time since RC1 now (RC2 is coming soon, I swear) but I believe the way we were authenticating with username / passwords was removed by Google (you can no longer grab a list of a user's profiles via feed anymore).  We switched to OAuth in the development branch to solve the issues and make it hopefully future-proof.

The only way to get Analytics running again in older versions is to authenticate in the development branch and then grab the profile ID that is stored in bigtree_settings and put it back in the older version.

#940 Re: Developer Help » Retrieving a field type on front-end » November 15, 2012 11:47am

Let me know if you come up with any cool method for doing it more easily. It's not something I've needed to do before so I haven't thought about it all that much!

#941 Re: Developer Help » Retrieving a field type on front-end » November 15, 2012 11:25am

Unfortunately, it doesn't look like there are any simple calls to get that info on the front end right now. I'm going to tweak BigTreeCMS::getTemplate to make it easier in RC2, but for now:

$resource_types = array();
$template = $cms->getTemplate($bigtree["page"]["template"]);
foreach ($template["resources"] as $resource) {
    $resource_types[$resource["id"]] = $resource["type"];
}
foreach ($bigtree["page"]["resources"] as $key => $val) {
    echo "Resource $key has a type of ".$resource_types[$key]."";
}

That would show you all the types of a given page. It probably makes sense to give the resource IDs as the keys of $template["resources"] enabling us to skip the whole $resource_types array so I'll make that change in RC2 (which is long coming, but will be here soon hopefully).

Ok, now for modules! For this you'll need to do a straight up SQL query to get the form ID first (which assumes you only have one form for your module data).

$module = new WhateverModule;
$form = sqlfetch(sqlquery("SELECT id FROM bigtree_module_forms WHERE `table` = '".sqlescape($module->Table)."'"));
$form = BigTreeAutoModule::getForm($form["id"]);

Once you have $form you can loop through $form["fields"] and grab the types. The keys of that array are the resource IDs and there's the "type" column for the type of resource.

#942 Re: General » Can't Login » October 26, 2012 11:23am

Try this query:

INSERT INTO bigtree_users (`email`,`password`,`level`,`permissions`,`alerts`,`daily_digest`,`change_password_hash`) VALUES ('tester@test.com','$P$BVrfuFkCBcoGcwRUehyW951OJGwcJf0','2','','','','');

#943 Re: General » Can't Login » October 26, 2012 10:47am

Try using straight up SQL queries, it seems like HeidiSQL is giving improper errors:

INSERT INTO bigtree_users (`email`,`password`,`level`) VALUES ('tester@test.com','$P$BVrfuFkCBcoGcwRUehyW951OJGwcJf0','2');

Replace tester@test.com with whatever email address you'd like.

#944 Re: General » Can't Login » October 26, 2012 10:39am

It sounds like the user creation in the install process is failing for you but I've never seen that happen before.

If you manually add a record to the bigtree_users table with your email address, the "level" column set to 2, and $P$BVrfuFkCBcoGcwRUehyW951OJGwcJf0 as the password field you should be able to login with the password "test".

#945 Re: Developer Help » Displaying an admin author » October 25, 2012 10:43am

Cool, I'll add those to the list of methods to add.

#946 Re: Developer Help » Displaying an admin author » October 25, 2012 10:27am

We're planning on adding some kind of interface to the audit trail in the admin area in the 4.1 release but there aren't any solid plans for what will be involved yet.  I'll add the request to build audit information-gathering into the BigTreeModule class in some way in 4.1 as well.  If there are any specific methods you're interested in let me know!

#947 Re: General » Can't Login » October 24, 2012 11:44am

Can you verify that there's an entry in the bigtree_users table for the email address you're trying to login with?

#948 Re: Developer Help » Development to Production » October 16, 2012 9:49am

BigTree stores all links as relative in the database so that when you push the database to your live server they are correct, so there's really only three steps to going live from your local development server:

  1. Copy your files over to your live server and setup write permissions for the web server on /cache/, /site/files/, /custom/inc/, /templates/callouts/, /templates/basic/, and /templates/routed/ -- If you miss any of the file permissions you can check in Developer under Site Status and it will give you a list of directories that need write permissions.

  2. Copy your database over to your live server.

  3. Edit your /templates/config.php file to adjust your database connection parameters and your domain, www_root, static_root, and admin_root.

After that you should be all set on your live server. Let me know if you have any questions!

#949 Re: Developer Help » Sample Site - Fatal error » October 4, 2012 2:32pm

Normally it occurs when the bigtree_modules table is changed directly in MySQL without the BigTree admin doing the changes (the hard class cache file gets cached with incorrect information).


The incoming Release Candidate 2 tries to address that very issue with a bit more grace, so it's a known pain point smile  Hopefully you're all set now but feel free to ask any more questions!

#950 Re: Developer Help » Sample Site - Fatal error » October 3, 2012 12:55pm

Can you try deleting the /cache/module-class-list.btc file and see if that fixes the error?

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.