Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serious 2.4 and 2.5 issues - extension not functional #13

Closed
nathanhornby opened this issue Sep 10, 2014 · 23 comments · May be fixed by #14
Closed

Serious 2.4 and 2.5 issues - extension not functional #13

nathanhornby opened this issue Sep 10, 2014 · 23 comments · May be fixed by #14

Comments

@nathanhornby
Copy link
Contributor

I'm hitting a blank white page when attempting to install on a fresh 2.4, nothing in Symphony logs, getting the following in my php log:

[10-Sep-2014 15:44:37] PHP Parse error: syntax error, unexpected T_BOOLEAN_AND in [redacted]/extensions/dump_db/extension.driver.php on line 53

Must be a recent change as I've used the extension a lot with 2.4 already. I'll have a quick look now but am noting the issue in case I don't get anywhere with it.

@nathanhornby
Copy link
Contributor Author

Ah, won't this be because of Administration::instance()->Author->isDeveloper() ? I'm sure I was looking into a problem with this just the other week… perhaps on the author roles extensions.

Edit: I was thinking of this issue: TwistedInteractive/author_roles#28 Which I actually think is 2.5 specific, and I tried it and it didn't help anyway.

@nathanhornby
Copy link
Contributor Author

Oh, found it! Should have read the error properly rather than getting fixated on the functions. There's an actual typo in the code:

if ($this->__filesNewer()) && Administration::instance()->Author->isDeveloper() {

Should be:

if ($this->__filesNewer() && Administration::instance()->Author->isDeveloper() ) {

Note the bracket in the wrong place! Oops! I'll issue a pull request. But… how did this not crop up before, looks like it was introduced in 2012 😕

@nathanhornby
Copy link
Contributor Author

Incidentally changing the Author variable to an object, Author() - is needed for 2.5 I believe (as with the issue flagged up-thread), but as it's a breaking change I'm not sure how you'd best want to handle it or when the best time to do it is.

@nathanhornby
Copy link
Contributor Author

I'm now unsure if this was a suitable fix. I'm attempting to deploy this very site in a different place and am getting the following:

Fatal error: Call to a member function isDeveloper() on a non-object in [redacted]/extensions/dump_db/extension.driver.php on line 53

Which is that same line above.

@nils-werner I don't suppose you can see anything obvious?

@nathanhornby nathanhornby changed the title Unable to install the extension on 2.4 Serious 2.4 and 2.5 issues - extension not functional Sep 30, 2014
@nathanhornby
Copy link
Contributor Author

Hope you don't mind Symphonists but I'm going to summon a few of you to take a look at this @brendo @nilshoerrmann @michael-e @nitriques.

@nils-werner doesn't seem to be about, and it's stumped me, I'm assuming someone more familiar with the process involved might spot something, I'm thinking it must be a simple error somewhere… (deprecated function?)

@michael-e
Copy link

Unfortunately my time is too limited to dive into an extension that I never used. In addition to that, I don't even understand the sense of this extension. Dumping or restoring a database is simple using standard tools (e.g. a UNIX/LINUX shell, or Sequel Pro on the Mac, or even the quirky phpMyAdmin). So why introduce additional programming complexity (and limiting factors like PHP timeouts) in this process? In my eyes attempting to administer a database using PHP is bad practice.

@nilshoerrmann
Copy link
Contributor

I'm sorry, but – me too – I've neither the time nor the knowledge to take care of this extension.

@nathanhornby
Copy link
Contributor Author

Thanks anyway guys!

@michael-e If you have a better workflow for sharing site data within a git repo between developers I'm all ears :) This isn't administration, it's just dumping/synching, and enables us to keep the data as part of the workspace. Although of course completely off-topic :)

@nilshoerrmann
Copy link
Contributor

We create dumps using Sequel Pro, sharing the files over local network.

@michael-e
Copy link

Sequel Pro is king. But especially for automated tasks, shell scripting is even better.

(Yes, I admit that my comment was off-topic.)

@nathanhornby
Copy link
Contributor Author

That'd be a clunky alternative for using this extension to bundle the db with the site IMO - but a great tool for actual administration - have never really looked for alternatives to phpmyadmin before so thanks for the tip!

In the meantime if anyone spots anything obviously wrong with this function please do let me know :)

@nitriques
Copy link

@nathanhornby Sorry for being so late and I've never used this extension before.

I personally use phpMyAdmin and MySQL Workbench for dealing with DB migration.

Finally, I would try the following (if your on 2.5) Symphony::Author()->isDeveloper(); on line 53.

@nathanhornby
Copy link
Contributor Author

Awesome thanks @nitriques will give that a go. I have a feeling I may have tried it already, but fingers crossed!

If any of you guys need to frequently pass a complete Symphony site around in the form of a repo, you'd quickly enjoy the benefits of this extension :)

@nitriques
Copy link

I should definitively try it!

@nathanhornby
Copy link
Contributor Author

Well, when it works again! :)

On 15 Oct 2014, at 18:45, Nicolas Brassard notifications@github.com wrote:

I should definitively try it!


Reply to this email directly or view it on GitHub.

@nils-werner
Copy link
Owner

Sorry for the delay...

Fixed in 1.11.2. Tried it in Symphony 2.4 and 2.5.

@nathanhornby
Copy link
Contributor Author

Thanks Nils! Looking at the commit it looks like the only significant change relating to this issue is the bracket move, did you see the follow up in this thread and the other error?

On 15 Oct 2014, at 20:35, Nils Werner notifications@github.com wrote:

Fixed in 1.11.2. Tried it in Symphony 2.4 and 2.5.


Reply to this email directly or view it on GitHub.

@nils-werner
Copy link
Owner

Yup, fixed that one too.

@nathanhornby
Copy link
Contributor Author

Awesome thanks, really appreciate it!

On 15 Oct 2014, at 20:50, Nils Werner notifications@github.com wrote:

Yup, fixed that one too.


Reply to this email directly or view it on GitHub.

@nathanhornby
Copy link
Contributor Author

Hi @nils-werner

I just updated the extension on a site I was about to deploy, deployed it (using FTP like old times!), logged in to the CMS and was immediately met with:

Symphony Fatal Error: Call to a member function isDeveloper() on a non-object
An error occurred in [redacted]/extensions/dump_db/extension.driver.php around line 53

Which part of the commit addressed this part of the issue? I'll take a look to see if the commit made its way to the extension properly (although as I said, I could only see my original fix above in the commit, which didn't resolve this).

@nathanhornby
Copy link
Contributor Author

The above steps to reproduce are important by the way, I've only seen this issue when deploying an existing site somewhere else; same issue whether I place the site files manually, or git submodule update the extensions into place.

@nils-werner
Copy link
Owner

What exactly did you do? What version of Symphony and Dump DB are you using?

@nathanhornby
Copy link
Contributor Author

Hi Nils,

That error is produced when first logging in after deploying the site (as mentioned, either by placing the files directly using FTP, or pulling via git). Symphony version 2.5.1 (I can't recall if this further error cropped up on the 2.4 deployment I did recently).

Moving the site seems to be an important step. So workflow:

  • Build site locally
  • Install Dump DB extension
  • Receive initial error
  • Put bracket fix in place, error gone, all fine.
  • Push last commit before deployment
  • Pull site into new environment, setting DB details in config and the site root in the htaccess
  • Login
  • Hit with the above Fatal error.

Only way I've found to resolve that error is to disable the extension, leaving it unusable.

I was getting this error before you updated the extension, and now after - it's persisted. So whatever those two versions are.

It's not rare for me to make silly mistakes, or to miss an obvious part of the problem - but I;ve seen this now on every deployment I've done over the past couple months, in differing environments etc. - so definitely something up. (famous last words?)

Nathan

Edit: I don't know what Dump DB stores or references, but given that moving the site is part of the issue, could it be due to a changing database name or similar? Naturally these settings are updated in the database section of the config file, but does dump db store anything like that that I should be addressing when moving a site?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants