WildcardSearch / Advanced-Sidebox

A plugin for MyBB forums that displays custom boxes on various forum pages.
GNU General Public License v3.0
20 stars 10 forks source link

Templates #142

Closed Destroy666x closed 10 years ago

Destroy666x commented 10 years ago
  1. I can't edit templates like asb_latest_threads_last_poster_name or asb_latest_threads_thread. I thought it's something wrong with free hosting, but then I saw this: https://github.com/Tanweth/Poll-Box/issues/2 and tested in localhost - same result.
  2. Some code could be moved to new templates, like $read_more in Random Quote module.
  3. Some code could be moved to existing templates, like $rand_quote_avatar, $rand_quote_author or $rand_quote_text to asb_rand_quote_sidebox. Content of these variables is finished and constant, so I don't see any reason to keep its HTML in PHP file.

BTW, just wondering, is there any reason why you use <<<EOF ... EOF; instead of quotes in many places?

WildcardSearch commented 10 years ago

I can't edit templates like asb_latest_threads_last_poster_name or asb_latest_threads_thread.

What do you mean you can't? Receiving an error message?

Some code could be moved to new templates, like $read_more in Random Quote module. Some code could be moved to existing templates

Makes sense. I'll look at it.

Destroy666x commented 10 years ago

Just like in the linked issue from the poll box module, changes don't save although the flash message says they were succesful. Other templates I tested for now saved well.

WildcardSearch commented 10 years ago

@Destroy666x I'm having a problem reproducing the error.

As a test I added the word 'hi' randomly into the template asb_latest_threads_last_poster_name and it shows fine:

Destroy666x commented 10 years ago

That's weird. I'll try again.

Destroy666x commented 10 years ago

Hmmmm, I tried to reinstall on both servers and still no luck. Again the same templates can't be saved. Could anyone else check?

WildcardSearch commented 10 years ago

@Destroy666x I am going to make a concerted effort tomorrow to reproduce this. Don't think I am abandoning you on this. :walking:

WildcardSearch commented 10 years ago

@Destroy666x I simply cannot reproduce this :frowning: . . . @tanweth can you give this a test?

Tanweth commented 10 years ago

I am also unable to reproduce the issue on either 2.0.5 or the latest build of 2.0.6. Edits on both of those templates save and display fine for me.

WildcardSearch commented 10 years ago

Then I am going to reassign this to 2.0.7 milestone and get 2.0.6 released today :smile:

@Destroy666x any luck on your end?

WildcardSearch commented 10 years ago

Report confirmed here: http://community.mybb.com/thread-131633-post-1065003.html#pid1065003

I wonder if it is dependent on hardware or settings . . .

Destroy666x commented 10 years ago

I tested it on clean MyBB with default settings. Happens only if I edit mentioned templates (maybe more than 2, didn't test all). Do you need more details, like PHP version etc.?

WildcardSearch commented 10 years ago

Do you need more details, like PHP version etc.?

Please. I have tried and tried to reproduce this with no success. Since it works for some and not for others, I must assume it has something to do with the way your board/server is set up . . . but then again I may be wrong.

avril-gh commented 10 years ago

cant reproduce it too,

maybe they trying to edit some old templates (eg. global templates) that for some reason was not removed on update

WildcardSearch commented 10 years ago

Hmmm . . . this has me so puzzled.

maybe they trying to edit some old templates (eg. global templates)

That was what I was thinking. We changed from global templates though-- and they can't have an sid (as in a unique sid indicating they belong to a theme, only -1) so when we update, it should be overwriting the global templates . . .

I don't know. I don't want to release this on the mods site if there is a hidden bug.

Destroy666x commented 10 years ago

I got it to work. One of these steps fixed it:

Uninstalled ASB 2.0.5 -> Removed all the files -> Removed leftovers from database with phpMyAdmin -there were some templates, not these which could not be edited though, for example on one server all 3 poll box templates triplicated in db. I guess this was the problem as they should be removed upon deinstallation (didn't upgrade on 2nd server, so that's not it). -> Installed ASB 2.0.6

WildcardSearch commented 10 years ago

Hmm . . . I'll check into it. Perhaps there is something wrong with the module's uninstall method . . .

Tanweth commented 10 years ago

Do you mean leftover templates from the original Poll Box module (asb_poll_box) or from the new module version (asb_poll)? That might be an important detail, since the old naming scheme was from before it was made compatible with 2.0.5's template system.

Destroy666x commented 10 years ago

From both actually. And from other modules too (randomly).

WildcardSearch commented 10 years ago

@destroy666 do you think any were leftover from a 1.x install or was this a fresh 2.x install?

Destroy666x commented 10 years ago

There were some template names that exist now and some that existed earlier.

WildcardSearch commented 10 years ago

Okay. I will continue to go over things and leave this open until for now.

WildcardSearch commented 10 years ago

I've really done what I consider to be a thorough job investigating this, but sadly with little results.

I am convinced that the problem was caused by some error in our installation process early on or some other coincidence. If it proves to be a real and recurring bug then I will re-open this.

Thanks for all that helped on this one and ofc @Destroy666x :smile: