You are not logged in.
Foreign keys, changed parent ids, etc was precisely what I was in the dark about, but it looks like those are not a concern. (The tree structure of pages is also changing.)
I will go for the easy way—a Sequel Pro import is fine by me. But it's also good to know that table renames don't have any fundamental problems.
Thanks Tim!
Tushar
Okay, we have now frozen content on live, copied live to dev, and begun publishing on dev.
Could you clarify the "migrate the bigtree_pages table from stage -> live" part? What is a safe way to do that?
I was wondering if importing the entire stage bigtree_pages to the live db (under a different name), then renaming it, would be okay. But is there a better way?
Thanks for all your help,
Tushar
Hello,
Probably unusual, but: I am thinking of swapping bigtree_pages with another "shadow" table.
The context is this. There are extensive editorial changes over many pages that all have to publish at the same time, "atomically" so to say. They have to be ready and viewable beforehand (i.e. published on a staging server). There are a few other constraints as well.
This leads me to think that the simplest way to publish all the staged edits would be to populate a staged_bigtree_pages table in production, and rename it to bigtree_pages at the right time. (The schema will be the same.)
I am not sure this will work. Are there any caching gotchas, would I have to restart the server, etc. How realistic is this plan?
Best,
Tushar
That's a great idea! I will try it as soon as I can. Thanks! Tushar
Is there a way for admin to selectively list subpages of a page by their template type? The subpages view seems to have three sections: visible, hidden and archived. It would be convenient for us to see a section with only subpages of the type 'link-list'. Or any other way of subsetting them.
Building views of custom modules is pretty flexible, but building alternate views of bigtree_pages is not something I have encountered. Any ideas?
Best,
Tushar
Tim, that did the trick, thanks! Learned something new today.
Tushar
Summary: I am trying to set up a new module on a local server (apache on mac) and the code dies due to not finding class 'CAFHomeHero' (just an example).
I think I did everything right in admin: a module, a view and form, etc. The only glitch was that custom/inc/modules/home-hero.php was already created, so admin failed to create it. There is not much in that file:
<?
class CAFHomeHero extends BigTreeModule {
var $Table = "caf_home_hero";
}
?>
The table exists.
After all this, refreshing a page still dies with a message like:
Class 'CAFHomeHero' not found in .../templates/basic/home.php
What am I missing?
Thanks,
Tushar
Thanks Tim, it's working! Tushar
Hi,
A certain template I am defining needs a variable-length list of web links. A link is (for now) a URL and anchor text, both text fields.
I am trying to put together a friendly UI for admins but I am confused.
I see similar widgets throughout admin (callouts, categories, etc), and it seems that a "matrix" field might do the trick. Is this right? If not, what is the minimum code that would have to be written?
Thank you,
Tushar
Thanks for the clarification, Tim. This is clearly going to be a somewhat long-term project for us; it's good to know what it involves.
Best,
Tushar
I am trying to see how feasible/useful it is to do a type of batch upload of images, so they are available from the file-browser admin.
We use amazon S3.
My first guess is that calling BigTreeStorage::store for every image file in question would do the trick. But is this right? Will the image end up in the right folder, and fully usable, and with thumbnails etc?
Best,
Tushar
Tim, thanks for the idea. Interestingly, Opengraph tags are the big need, not SEO fields. Best, Tushar
I more or less expected that, and it will be hard to get permission to spend time on it.
Maybe a module with a table to keep SEO data, which overrides the page's own data, is a practical idea?
We will probably be OK with module-level permissions if it is not a very powerful module.
I am trying to put a certain type of permission structure on BigTree pages but can't figure out the best way.
The aim is to allow editing only a couple of SEO fields, to specific users. The page content, etc should not be editable. The smaller the form they see, the better.
What is the cleanest way to get this effect?
Best,
Tushar
Apologies for the late reply. You are right. There are some indirections, and variables being set from other variables, that were confusing me. Thanks! Tushar
My basic problem: I need to change a bit of markup high on the page--it's in templates/layouts/_header.php. It is to be dependent on the specific template being used for any given page.
I thought that simply setting a variable in the innermost template and reading it in the outermost would do the trick. But I don't think I have understood how Bigtree composes a page exactly.
Here is the concrete problem. We have this in templates/layouts/_header.php:
<meta property="og:image" content="<?=$page_image?>">
I want to set (or get the effect of setting) $page_image from inside templates/routed/calendar, and other such templates.
What's a good way to go about this?
Thanks,
Tushar
OK, I think I will not clear module view caches after all.
It's still good to know--for instance I could clear it on a staging server etc.
Thanks!
Tushar
I am about to run
delete from `bigtree_module_view_cache`;
directly on the production server.
Am I right in thinking that this will definitely, absolutely have no effect whatsoever on the user-facing site?
Thanks,
Tushar
(this one table is now 2/3rds of the db)
Sounds great, thank you! Tushar
Thanks!
By secret key (for the templates/ajax way), do you mean an ssh key? Or logic in the script to check a key?
I am thinking of a side project involving FormBuilder, but not sure how to organize it.
The aim is to produce a json export of form submissions, given a date range. In the ideal scenario, the form in question would be located via the page it is included in.
Much of this code is ready in command-line form. But what is the right place to install it? Would I have to patch FormBuilder, or should I make a custom class?
Related questions:
What would be a good URL for this sort of endpoint? E.g. for http://example.com/admin/pages/edit/1/ it would be nice to have a predictable json URL.
Is there a way to log in to admin from the command line? It would be great to script this sort of thing with e.g. curl.
Best,
Tushar
Thanks Tim!
Tushar
It seems that handle404() increments the requests column every time a 301 redirect is issued.
Wanted to confirm: does this number ever get reset or changed? If a manual action is the only way to change it, we are going to use it in a report.
Thanks! Tushar
Yes, there is indeed a bug; we have seen that upload-with-replace to S3 does not replace, but creates a file with a fresh numerical suffix.
No complaints this one time! But we do have a growing number of unnecessary files.
We have a file browser in admin that is backed by S3.
An admin just managed to "delete" a folder. As far as I can see, this means that some rows in bigtree_resource_folders and bigtree_resources have disappeared.
Thanks to S3, the site continues to serve files that were in the "deleted" folder. But they are now unavailable from the file browser.
I can restore the rows that were dropped from the two tables. But is that the right thing to do?
Best,
Tushar