Jump to content

I somehow messed up my PW installation


owzim
 Share

Recommended Posts

I moved to the current dev version of PW because of the new $page->render(); options

Everything worked fine.

I created a repeater field with a title and a body, and after save this happened:

Fatal error:  Exception: Could not execute User::__construct() (in /path-to-pw/wire/core/Pages.php line 323)

#0 /path-to-pw/wire/core/Pages.php(0): mysqli_result->fetch_object()
#1 /path-to-pw/wire/core/PagesType.php(109): Pages->getById(Array, Object(Template), 29)
#2 /path-to-pw/wire/core/Users.php(60): PagesType->get(40)
#3 /path-to-pw/wire/core/Session.php(82): Users->getGuestUser()
#4 /path-to-pw/wire/core/ProcessWire.php(138): Session->__construct()
#5 /path-to-pw/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config))
#6 /path-to-pw/index.php(184): ProcessWire->__construct(Object(Config))
#7 {main} in /path-to-pw/index.php on line 215

This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

since then I can't access neither the site nor the admin area, it always shows this error.

I tried to recover the db via TimeMachine

I copied over the needed files, then:


Fatal error:  Exception: Table 'dbname.modules' doesn't exist
SELECT id, class, flags, data FROM modules ORDER BY class (in /path-to-pw/wire/core/Database.php line 118)

#0 /path-to-pw/wire/core/Modules.php(167): Database->query('SELECT id, clas...')
#1 /path-to-pw/wire/core/Modules.php(85): Modules->load('/path-to...')
#2 /path-to-pw/wire/core/ProcessWire.php(99): Modules->__construct('/path-to...', '/path-to...')
#3 /path-to-pw/wire/core/ProcessWire.php(45): ProcessWire->load(Object(Config))
#4 /path-to-pw/index.php(184): ProcessWire->__construct(Object(Config))
#5 {main} in /path-to-pw/index.php on line 215

This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

I guess some schema was altered after the switch to the current dev branch?

I somehow need to recover the installation or ... =(

Link to comment
Share on other sites

I was able to restore everything to a state with which I can work.

I restored from TimeMachine to MAMP/db/mysql (dbfolder being the name of the db):

dbfolder/

ibdata1

b_logfile0

b_logfile1

and switched to the lated dev-version of wire/

still don't know what caused the error.

Link to comment
Share on other sites

Ok, here we go again. After I tried to do the same thing, same behaviour, with a seemingly broken DB as a result.

Here the exact steps:

  • Created new repeater field
  • after first creation process added title and body field
  • set to global and autojoin
  • after save, error

[edit1]

I was able to narrow it down to the global option, which caused the error. Saving everything else but global was fine.

Perhaps installed modules interesting as well:

  • Batcher
  • Custom Page List
  • jQuery Data Table Ajax
  • Page Delete
  • Pagination Markup (Core)
  • Repeater (Core)
  • Site Profile Exporter
  • Thumbnails
  • Wordpress like Shortcodes
  • Modules Mananger

[/edit1]

[edit2]

I was able to reproduce this error with a fresh PW installation

installed Modules

  • Repeater (Core)

  • Modules Mananger

It might be of interest that the field was named "sections"

[/edit2]

[edit3]

I was able to reproduce this error with a fresh PW installation with only repeater module installed and nothing else.

The field name "sections" was not relevant.

MySQL 5.5.9

PHP 5.3.6

[/edit3]

with the latest stable release of PW 2.3

As stated before, deleting cache and session files did not help.

Don't know which additional details I could serve.

Link to comment
Share on other sites

I'm not sure why you want to make it autojoin and global, global ok but autojoin? I'm not sure what autojoin does on repeaters but I don't think it's really needed. But most likely this or global could cause problems with repeater...

However I just tried with one install and it works fine making it autojoin, but didn't wanted to go global... :)

In the other install (latest dev) where languages support module is installed and also LanguagePageNames, I first had to install repeater module... and then got this:

Notice: Undefined property: User::$language in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line443

Catchable fatal error: Argument 2 passed to LanguageSupportPageNames::getPagePath() must be an instance of Language, null given, called in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 444 and defined in/Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 244


This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

 

 

After a refresh it was gone.

 

But when I do create a repeater field and make it autojoin and global I got this:

 

Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/FieldtypeTextLanguage.module on line 41

Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/FieldtypeTextLanguage.module on line 41

Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/LanguageSupport/LanguagesPageFieldValue.php on line 114

Fatal error: Exception: Method Page::editable does not exist or is not callable in this context (in /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php line 232) #0 [internal function]: Wire->__call('editable', Array) #1 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module(485): Page->editable('some_repeater') #2 [internal function]: FieldtypeRepeater->___wakeupValue(Object(Page), Object(Field), Array) #3 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php(271): call_user_func_array(Array, Array) #4 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Wire.php(229): Wire->runHooks('wakeupValue', Array) #5 [internal function]: Wire->__call('wakeupValue', Array) #6 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Page.php(443): FieldtypeRepeater->wakeupValue(Object(Page), Object(Field), Array) #7 /Applications/XAMPP/xamppfiles/htdocs/pwmultilang/wire/core/Page.php(1352): Page->setFieldValue('some_repeater', Ar in/Applications/XAMPP/xamppfiles/htdocs/pwmultilang/index.php on line 214


This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.

And I can't do anything anymore, just get this error always.

Then I go delete the field and its table and in fieldgroups in the db and it's all back and working again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...