jsmrtn / craftagram

Grab Instagram content through the Instagram Basic Display API
Other
14 stars 8 forks source link

Multi-Site Settings? #30

Closed gjhead closed 3 years ago

gjhead commented 3 years ago

Consider the ability to change the Instagram account being used on a site-by-site basis when using Craft Multi-Site. For example, a company that has websites for their locations in different countries may wish to use their own Instagram account.

Even better: a product manufacturer may have different Instagram accounts for each country because they offer different products in each country.

jsmrtn commented 3 years ago

@gjhead @tobyzerner

I've pushed this update to develop, which you should be able to get by (if you don't already know) updating your composer from ^1.3.0 to dev-develop and running composer install.

If you could give it a trial run and see if you run into any issues that would be appreciated, but hopefully a new release should be cut next week sometime.

tobyzerner commented 3 years ago

Hey thanks @joshua-martin! Unfortunately I'm getting the following error when I select another site from the dropdown:

Template not found: admin/craftagram/settings/2

jsmrtn commented 3 years ago

Very strange. I'm not seeing that issue–that route is built out on line 89, and works a-ok for me locally. Are you doing anything atypical in your install? I wonder if you could delete vendor and composer.lock then re-run composer install and see if that resolves the issue?

https://github.com/scaramangagency/craftagram/blob/338d7118be87529d3b3670cf709b6d607aae407d/src/Craftagram.php#L84-L91

tobyzerner commented 3 years ago

Ah, I found the issue! I'm using a different cpTrigger in my installation. But Craftagram's site select button does not respect this, and links to admin/... regardless. The route works fine if I manually change the URL.

jsmrtn commented 3 years ago

Ah well done @tobyzerner. I've added a commit that fixes that issue.

AnsonSL commented 3 years ago

@joshua-martin

Ran the updater and I'm getting:

One of craftagram’s migrations failed. ParseError: syntax error, unexpected ')'

Upon looking at the logs:

2021-01-04 15:23:47 [-][79165][-][error][ParseError] ParseError: syntax error, unexpected ')' in ...\m201127_131603_multisite.php:27

jsmrtn commented 3 years ago

Can you run ./craft migrate/all from CLI?


From: AnsonSL notifications@github.com Sent: Monday, January 4, 2021 8:30:08 PM To: scaramangagency/craftagram craftagram@noreply.github.com Cc: Josh Martin josh@Scaramanga.agency; Mention mention@noreply.github.com Subject: Re: [scaramangagency/craftagram] Multi-Site Settings? (#30)

@joshua-martinhttps://github.com/joshua-martin

Ran the updater and I'm getting:

One of craftagram’s migrations failed. ParseError: syntax error, unexpected ')'

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/scaramangagency/craftagram/issues/30#issuecomment-754200794, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAM5Z3OWFJFYYNKPNILPUULSYIQNBANCNFSM4SQ5EFPA.

jsmrtn commented 3 years ago

@AnsonSL This should be fixed, now. Stray comma in the migration broke when updating through the admin, but would work successfully on the CLI.

AnsonSL commented 3 years ago

@joshua-martin Thanks Joshua, that seems to have done the trick with the updater. Appreciate the quick fix!