#1 Developer Help » Cloudfront configured! Resource URLs still the same » July 1, 2021 4:19pm

tsamant
Replies: 0

Hello,

After a long time I got another chance to try enabling cloudfront, and this time I was lucky.

The distribution is now set in Bigtree. But none of the URLs produced by Bigtree have changed. I expected all S3 URLs to change automatically, but is there a catchup to be done?

Bigtree went through a long cycle of recaching when I set the Cloudfront distribution. I don't understand what it did, but maybe it's related.

The Cloudfront URLs themselves are loading fine.

Best,
Tushar

#2 Re: Developer Help » Cloudfront » June 3, 2021 4:20pm

Composer update is failing with out of memory on our test server, unfortunately. AWS SDK is at 3.52.30. If that helps.

There's CA certs in the cache  directory.

Best,
Tushar

#3 Re: Developer Help » Cloudfront » June 3, 2021 4:02pm

I just tried 4.4.14. Bigtree went through an upgrade sequence for file metadata, which may be unrelated.

After that, the cloud storage behavior has not changed. All I can configure is AWS Region, Access Key ID, and Secret Access Key, as before.

Tushar

#4 Developer Help » Cloudfront » June 2, 2021 3:25pm

tsamant
Replies: 3

(Continuing a previous conversation here)

I am trying to set up Cloudfront, already have S3. Bigtree is on 4.4.12.

I thought maybe resaving the S3 configuration in the cloud storage tab would prompt me for Cloudfront configuration. I was wrong. What am I missing?

I have done nothing in AWS's own admin, by the way.

Thanks,
Tushar

#5 Re: Developer Help » Cleaning up bigtree_404s » November 24, 2020 11:19am

Thanks! For now, an ad hoc query to blow away empty redirect_urls will do for us. Absolute broken_urls as well.

#6 Developer Help » Cleaning up bigtree_404s » November 23, 2020 4:17pm

tsamant
Replies: 2

Our bigtree_404s table is getting quite bulky. I am seeing entries in there that don't immediately make sense, and am thinking of cleaning them up. Questions:

1. Does an absolute URL as broken_url have any effect at all? There's a lot of them in there, somehow. Not sure how they got in.

2. Does an external link in redirect_url serve any purpose? Does bigtree redirect to external sites?

3. If redirect_url is empty, would deleting that row break any functionality? (Assuming we are not interested in the number of requests to the broken URL.)

Thanks,
Tushar

#7 Developer Help » Form Builder and replaceRelativeRoots » May 11, 2020 4:37pm

tsamant
Replies: 1

Sometime in 2018, the implementation of replaceRelativeRoots() changed from str_replace to strtr. We upgraded to a post-2018 bigtree version very recently.

It doesn't play well with the version of Form Builder that we have, which sanitizes form submissions with replaceRelativeRoots. (It used to recursively sanitize before, now it warns and returns null or an empty string.)

Due to some urgency over here, I am going to remove replaceRelativeRoots calls in Form Builder. But I was wondering if there is an officially blessed fix for this.

Thanks,
Tushar

#8 Re: Developer Help » Upgrading 4.2 to 4.4 » July 1, 2019 5:47pm

Hi, Tim,

Any word on this? It seems the admin backend and frontend might have different ideas about what the file browser ajax endpoint should be, admin/ajax/files vs admin/ajax/file-browser . Wondering if there is an upgrade step I have missed?

Tushar

#9 Re: Developer Help » Upgrading 4.2 to 4.4 » June 17, 2019 6:08pm

Following up to the upgrade saga:

The upgrade took about 95 minutes and went well. No major problems to the front end that we can see so far. Some questions:

1. There is a files tab in admin, new to us. It looks fairly intuitive; however, the "File Browser" that we have and use for attaching images to tours, buildings etc is now empty. How do we reuse our S3 images?

2. Google Analytics: we want to disable this in admin. How to do that?

3. Should custom/json-db/, vendor/, and cron-run.php be put in .gitignore?

4. There are various minor warnings in admin. An example:

Warning: strtr() expects parameter 1 to be string, array given in /var/www/caf/bigtree/core/inc/bigtree/cms.php on line 1754

Is there some obvious thing I have overlooked that is causing this?

We have no set date for upgrading, so no rush.

Thanks,
Tushar

#10 Re: Developer Help » Upgrading 4.2 to 4.4 » June 13, 2019 2:37pm

This is fantastic. Thanks again Tim!

Tushar

#11 Re: Developer Help » Upgrading 4.2 to 4.4 » June 13, 2019 1:04pm

Tim, thank you! I am going to start fresh and see how it goes. I have two questions:

1. Will a 4.2-compatible database and 4.4 BigTree trigger this upgrade, just by loading the developer tab?

2. Does the upgrade modify or delete cloud images? Almost all our images, on dev or prod, are served from the same S3 bucket. (File manager being unusable for a while is okay, but user-facing images need to keep serving).

Thanks again!
Tushar

#12 Developer Help » Upgrading 4.2 to 4.4 » June 6, 2019 11:01am

tsamant
Replies: 7

I am trying to upgrade from 4.2 to 4.4 and have a few immediate problems: e.g. custom classes not found,  routed templates searched for in the wrong place (basic) etc.

I did the "upgrade" with git pull in the bigtree directory, and now I wonder if that's the right way. Especially since the admin developer tab began to go through an upgrade process a little later (which I stopped).

So, since it's early for specific questions:

1. What's the recommended way to go from php5.6 -> 7.2  AND bigtree 4.2 -> 4.4 ?

2. Are there some changes to custom code that are a must? (We have a custom router among other things.)

3. Can the process of converting file browser data be speeded up or done from cli.

4. (This is documented but unfortunately can't find it) What PHP libraries are required? E.g. curl.

Thank you,
Tushar

#13 Re: Developer Help » BigTreeEmailService » October 2, 2018 1:00pm

Sounds good, Tim. I will see if I can extend the class independently of the service provider.

To clarify, we want this for ticket purchase confirmations. It's proven useful to attach a PDF ticket to the message itself. (We use a different provider for newsletters etc, which doesn't involve BigTree.)

Thanks!
Tushar

#14 Developer Help » BigTreeEmailService » September 28, 2018 4:54pm

tsamant
Replies: 2

We will be needing an email service provider in the near future, and it will probably be one supported by BigTree.

BigTreeEmailService provides one method, sendEmail, and it's not obvious from the docs how to send a message with an attachment.

Any ideas? A typical email in our situation is HTML with multiple PDF attachments.

Thanks!
Tushar

#15 Re: Developer Help » Content change saga (continued) » July 19, 2018 5:40pm

That's the best news ever! Thanks for keeping things, as they say, loosely coupled. Tushar

#16 Developer Help » Content change saga (continued) » July 19, 2018 3:34pm

tsamant
Replies: 2

Hello,

To recall, I am trying to "unveil" a large number of content changes (to pages and tree structure).

At this point, dump-from-stage/undump-to-live seems to be the only option.

But there are other parts of the live DB that really can't be overwritten (e.g. calendar). So I am trying to get a minimum list of tables that need to be synced.

There are four page operations being performed on stage:

1. Create new
2. Edit
3. Move to another parent
4. Delete

So far, I believe these have effects on: bigtree_pages, bigtree_route_history, bigtree_audit_trail.

So I think that dump/undump on these three will do the trick. Is there anything I am missing? Thanks! Tushar

#18 Developer Help » BigTreeAdmin updatePageParent » July 16, 2018 3:27pm

tsamant
Replies: 2

I'm back.

I might have to reorganize our existing set of pages—which amounts to scripting a large number of "move page" operations.

Is it correct to say that a single updatePageParent() call will accomplish a move-page? Also, I assume this method takes page ids?

Thanks,
Tushar

#19 Re: Developer Help » Renaming tables » July 12, 2018 3:21pm

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

#20 Re: Developer Help » Renaming tables » July 12, 2018 12:11pm

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

#21 Developer Help » Renaming tables » July 12, 2018 10:30am

tsamant
Replies: 4

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

#22 Re: Developer Help » Alternative Views of Subpages » July 11, 2018 6:02pm

That's a great idea! I will try it as soon as I can. Thanks! Tushar

#23 Developer Help » Alternative Views of Subpages » July 10, 2018 4:35pm

tsamant
Replies: 2

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

#24 Re: Developer Help » Class not found in templates/basic/home.php » June 18, 2018 12:42pm

Tim, that did the trick, thanks! Learned something new today.

Tushar

#25 Developer Help » Class not found in templates/basic/home.php » June 18, 2018 11:08am

tsamant
Replies: 2

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

Board footer

Powered by FluxBB

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